summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-06-09 18:11:21 +0200
committerStaale Smedseng <staale.smedseng@sun.com>2009-06-09 18:11:21 +0200
commita073ee45c290d81d365b48b03ef6924e778cd64f (patch)
tree193df6c7ac6afa01d015869845f23915230d1eaf /sql/item_cmpfunc.cc
parent0b7fecf9e486990d173cc87b2c94aee06b0f7dbb (diff)
downloadmariadb-git-a073ee45c290d81d365b48b03ef6924e778cd64f.tar.gz
Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2 Compiling MySQL with gcc 4.3.2 and later produces a number of warnings, many of which are new with the recent compiler versions. This bug will be resolved in more than one patch to limit the size of changesets. This is the first patch, fixing a number of the warnings, predominantly "suggest using parentheses around && in ||", and empty for and while bodies.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 01d3e9bed52..c940c4ab3c0 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1419,8 +1419,8 @@ longlong Item_func_truth::val_int()
bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
{
- if (!args[0]->fixed && args[0]->fix_fields(thd, args) ||
- !cache && !(cache= Item_cache::get_cache(args[0])))
+ if ((!args[0]->fixed && args[0]->fix_fields(thd, args)) ||
+ (!cache && !(cache= Item_cache::get_cache(args[0]))))
return 1;
cache->setup(args[0]);
@@ -2934,8 +2934,8 @@ int cmp_longlong(void *cmp_arg,
One of the args is unsigned and is too big to fit into the
positive signed range. Report no match.
*/
- if (a->unsigned_flag && ((ulonglong) a->val) > (ulonglong) LONGLONG_MAX ||
- b->unsigned_flag && ((ulonglong) b->val) > (ulonglong) LONGLONG_MAX)
+ if ((a->unsigned_flag && ((ulonglong) a->val) > (ulonglong) LONGLONG_MAX) ||
+ (b->unsigned_flag && ((ulonglong) b->val) > (ulonglong) LONGLONG_MAX))
return a->unsigned_flag ? 1 : -1;
/*
Although the signedness differs both args can fit into the signed