summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorIgnacio Galarza <iggy@mysql.com>2009-02-13 11:41:47 -0500
committerIgnacio Galarza <iggy@mysql.com>2009-02-13 11:41:47 -0500
commit5b7347bda31b9d66cd78937e5dc339f553b9a736 (patch)
tree85b39362efeae16536a90f3a3624acd6916d4305 /sql/sql_lex.cc
parent50b19265ffcf4e4708c86345a5c166c58dbdb523 (diff)
parent54fbbf9591e21cda9f7b26c2d795d88f51827f07 (diff)
downloadmariadb-git-5b7347bda31b9d66cd78937e5dc339f553b9a736.tar.gz
Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 9619d26893c..8899acd37ec 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -253,7 +253,7 @@ void Lex_input_stream::body_utf8_append_literal(THD *thd,
{
thd->convert_string(&utf_txt,
&my_charset_utf8_general_ci,
- txt->str, txt->length,
+ txt->str, (uint) txt->length,
txt_cs);
}
else
@@ -435,7 +435,7 @@ bool is_keyword(const char *name, uint len)
bool is_lex_native_function(const LEX_STRING *name)
{
DBUG_ASSERT(name != NULL);
- return (get_hash_symbol(name->str, name->length, 1) != 0);
+ return (get_hash_symbol(name->str, (uint) name->length, 1) != 0);
}
/* make a copy of token before ptr and set yytoklen */
@@ -1074,7 +1074,7 @@ int MYSQLlex(void *arg, void *yythd)
if (c != '.')
{ // Found complete integer number.
yylval->lex_str=get_token(lip, 0, lip->yyLength());
- return int_token(yylval->lex_str.str,yylval->lex_str.length);
+ return int_token(yylval->lex_str.str, (uint) yylval->lex_str.length);
}
// fall through
case MY_LEX_REAL: // Incomplete real number
@@ -1977,8 +1977,8 @@ void st_select_lex::print_order(String *str,
if (order->counter_used)
{
char buffer[20];
- uint length= my_snprintf(buffer, 20, "%d", order->counter);
- str->append(buffer, length);
+ size_t length= my_snprintf(buffer, 20, "%d", order->counter);
+ str->append(buffer, (uint) length);
}
else
(*order->item)->print(str, query_type);