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/field_conv.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/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 2705d4f617b..7beb41b8ff1 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -95,7 +95,7 @@ static void do_field_to_null_str(Copy_field *copy) static void do_outer_field_to_null_str(Copy_field *copy) { if (*copy->null_row || - copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit)) + (copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit))) { bzero(copy->to_ptr,copy->from_length); copy->to_null_ptr[0]=1; // Always bit 1 @@ -209,7 +209,7 @@ static void do_copy_null(Copy_field *copy) static void do_outer_field_null(Copy_field *copy) { if (*copy->null_row || - copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit)) + (copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit))) { *copy->to_null_ptr|=copy->to_bit; copy->to_field->reset(); @@ -656,9 +656,9 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*) */ if (to->real_type() != from->real_type() || !compatible_db_low_byte_first || - ((to->table->in_use->variables.sql_mode & + (((to->table->in_use->variables.sql_mode & (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) && - to->type() == FIELD_TYPE_DATE || + to->type() == FIELD_TYPE_DATE) || to->type() == FIELD_TYPE_DATETIME)) { if (from->real_type() == FIELD_TYPE_ENUM || |