diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-09 14:55:30 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-09 14:55:30 +0200 |
commit | a092ed1afe3c3c7889810f45d591cfb2633c87f9 (patch) | |
tree | 6cee8c2084e348d45fc326e9557d2f4148c4ab1a /sql/item_cmpfunc.cc | |
parent | 0b7fecf9e486990d173cc87b2c94aee06b0f7dbb (diff) | |
download | mariadb-git-a092ed1afe3c3c7889810f45d591cfb2633c87f9.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.cc | 8 |
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 |