summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-06-17 15:54:01 +0200
committerStaale Smedseng <staale.smedseng@sun.com>2009-06-17 15:54:01 +0200
commit3b0e6e41098557dab9fe7ca5c59f2863fd671b94 (patch)
treeb8fb3c1fb387986cd39d4dc291845cd51d2796e5 /sql/sql_lex.cc
parent689901f36f13b0ad5fe908998625493814ed33fa (diff)
downloadmariadb-git-3b0e6e41098557dab9fe7ca5c59f2863fd671b94.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 second patch, fixing more of the warnings.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 436f41dd209..061a20679e7 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -661,7 +661,7 @@ int MYSQLlex(void *arg, void *yythd)
else
#endif
{
- for (result_state= c; ident_map[c= yyGet()]; result_state|= c);
+ for (result_state= c; ident_map[c= yyGet()]; result_state|= c) ;
/* If there were non-ASCII characters, mark that we must convert */
result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT;
}
@@ -673,7 +673,7 @@ int MYSQLlex(void *arg, void *yythd)
If we find a space then this can't be an identifier. We notice this
below by checking start != lex->ptr.
*/
- for (; state_map[c] == MY_LEX_SKIP ; c= yyGet());
+ for (; state_map[c] == MY_LEX_SKIP ; c= yyGet()) ;
}
if (start == lip->ptr && c == '.' && ident_map[yyPeek()])
lip->next_state=MY_LEX_IDENT_SEP;
@@ -782,7 +782,7 @@ int MYSQLlex(void *arg, void *yythd)
else
#endif
{
- for (result_state=0; ident_map[c= yyGet()]; result_state|= c);
+ for (result_state=0; ident_map[c= yyGet()]; result_state|= c) ;
/* If there were non-ASCII characters, mark that we must convert */
result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT;
}
@@ -872,7 +872,7 @@ int MYSQLlex(void *arg, void *yythd)
case MY_LEX_BIN_NUMBER: // Found b'bin-string'
yyGet(); // Skip '
- while ((c= yyGet()) == '0' || c == '1');
+ while ((c= yyGet()) == '0' || c == '1') ;
length= (uint) (lip->ptr - lip->tok_start); // Length of bin-num + 3
if (c != '\'')
return(ABORT_SYM); // Illegal hex constant
@@ -1080,7 +1080,7 @@ int MYSQLlex(void *arg, void *yythd)
[(global | local | session) .]variable_name
*/
- for (result_state= 0; ident_map[c= yyGet()]; result_state|= c);
+ for (result_state= 0; ident_map[c= yyGet()]; result_state|= c) ;
/* If there were non-ASCII characters, mark that we must convert */
result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT;
@@ -1670,7 +1670,7 @@ void st_select_lex::print_limit(THD *thd, String *str)
item->substype() == Item_subselect::ALL_SUBS))
{
DBUG_ASSERT(!item->fixed ||
- select_limit->val_int() == LL(1) && offset_limit == 0);
+ (select_limit->val_int() == LL(1) && offset_limit == 0));
return;
}