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
commitdae006c17fe4962c1f79060a10a1dc80dc07bf03 (patch)
tree193df6c7ac6afa01d015869845f23915230d1eaf /sql/opt_sum.cc
parente43d8e584d76aa646dd0a88cbb4b85b20fffe37c (diff)
downloadmariadb-git-dae006c17fe4962c1f79060a10a1dc80dc07bf03.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)