summaryrefslogtreecommitdiff
path: root/sql/opt_sum.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/opt_sum.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/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index f8603f06fa0..66aa29c6680 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -690,8 +690,8 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
}
else if (eq_type)
{
- if (!is_null && !cond->val_int() ||
- is_null && !test(part->field->is_null()))
+ if ((!is_null && !cond->val_int()) ||
+ (is_null && !test(part->field->is_null())))
return 0; // Impossible test
}
else if (is_field_part)