1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
Staale Smedseng
2009-06-09 18:11:21 +02:00
parent 0b7fecf9e4
commit a073ee45c2
15 changed files with 61 additions and 60 deletions

View File

@@ -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 ||