summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-06-09 14:55:30 +0200
committerStaale Smedseng <staale.smedseng@sun.com>2009-06-09 14:55:30 +0200
commita092ed1afe3c3c7889810f45d591cfb2633c87f9 (patch)
tree6cee8c2084e348d45fc326e9557d2f4148c4ab1a /sql/opt_sum.cc
parent0b7fecf9e486990d173cc87b2c94aee06b0f7dbb (diff)
downloadmariadb-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/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)