summaryrefslogtreecommitdiff
path: root/sql/spatial.h
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2008-12-16 10:12:22 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2008-12-16 10:12:22 -0200
commit3ce026ec2f66a73be82a26055dd4761479a73811 (patch)
treec93d4234e3d8d278b91319b97e252f86a083eb0d /sql/spatial.h
parent0772b6a833a33304c753b7afa9b58b6b6c8f6464 (diff)
downloadmariadb-git-3ce026ec2f66a73be82a26055dd4761479a73811.tar.gz
Fix warnings and bug spotted by gcc-4.3.
Related to operator precedence and associativity. Make the expressions as explicit as possible. sql/field.h: Silence gcc-4.3 warning: be more explicit. sql/item.cc: Silence gcc-4.3 warning: be more explicit. sql/item_sum.cc: Silence gcc-4.3 warning: be more explicit. sql/log_event.cc: Silence gcc-4.3 warning: be more explicit. sql/spatial.h: Silence gcc-4.3 warning: be more explicit. sql/sql_lex.cc: Silence gcc-4.3 warning: be more explicit. sql/table.h: Silence gcc-4.3 warning: be more explicit. storage/federated/ha_federated.cc: Fix operator precedence bug. storage/heap/ha_heap.cc: Silence gcc-4.3 warning: be more explicit.
Diffstat (limited to 'sql/spatial.h')
-rw-r--r--sql/spatial.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/spatial.h b/sql/spatial.h
index f806861290e..69a1f24506e 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -116,12 +116,12 @@ struct MBR
int touches(const MBR *mbr)
{
/* The following should be safe, even if we compare doubles */
- return ((((mbr->xmin == xmax) || (mbr->xmax == xmin)) &&
- ((mbr->ymin >= ymin) && (mbr->ymin <= ymax) ||
- (mbr->ymax >= ymin) && (mbr->ymax <= ymax))) ||
+ return ((((mbr->xmin == xmax) || (mbr->xmax == xmin)) &&
+ (((mbr->ymin >= ymin) && (mbr->ymin <= ymax)) ||
+ ((mbr->ymax >= ymin) && (mbr->ymax <= ymax)))) ||
(((mbr->ymin == ymax) || (mbr->ymax == ymin)) &&
- ((mbr->xmin >= xmin) && (mbr->xmin <= xmax) ||
- (mbr->xmax >= xmin) && (mbr->xmax <= xmax))));
+ (((mbr->xmin >= xmin) && (mbr->xmin <= xmax)) ||
+ ((mbr->xmax >= xmin) && (mbr->xmax <= xmax)))));
}
int within(const MBR *mbr)