diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-09 18:11:21 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-09 18:11:21 +0200 |
commit | a073ee45c290d81d365b48b03ef6924e778cd64f (patch) | |
tree | 193df6c7ac6afa01d015869845f23915230d1eaf /sql/item_sum.cc | |
parent | 0b7fecf9e486990d173cc87b2c94aee06b0f7dbb (diff) | |
download | mariadb-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_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 57045f52825..a381361e8a2 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -652,8 +652,8 @@ Item_sum_hybrid::fix_fields(THD *thd, Item **ref) return TRUE; // 'item' can be changed during fix_fields - if (!item->fixed && - item->fix_fields(thd, args) || + if ((!item->fixed && + item->fix_fields(thd, args)) || (item= args[0])->check_cols(1)) return TRUE; decimals=item->decimals; @@ -969,8 +969,8 @@ void Item_sum_distinct::fix_length_and_dec() integers each <= 2^32. */ if (table_field_type == MYSQL_TYPE_INT24 || - table_field_type >= MYSQL_TYPE_TINY && - table_field_type <= MYSQL_TYPE_LONG) + (table_field_type >= MYSQL_TYPE_TINY && + table_field_type <= MYSQL_TYPE_LONG)) { val.traits= Hybrid_type_traits_fast_decimal::instance(); break; @@ -2608,8 +2608,8 @@ bool Item_sum_count_distinct::setup(THD *thd) enum enum_field_types f_type= f->type(); tree_key_length+= f->pack_length(); if ((f_type == MYSQL_TYPE_VARCHAR) || - !f->binary() && (f_type == MYSQL_TYPE_STRING || - f_type == MYSQL_TYPE_VAR_STRING)) + (!f->binary() && (f_type == MYSQL_TYPE_STRING || + f_type == MYSQL_TYPE_VAR_STRING))) { all_binary= FALSE; break; |