fix compile warnings

This commit is contained in:
Vladislav Vaintroub 2011-07-05 22:38:38 +02:00
parent f9cb1467b8
commit b792411a7a
2 changed files with 3 additions and 3 deletions

View File

@ -381,7 +381,7 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root,
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if (!(parser->buff= (char*) alloc_root(mem_root, stat_info.st_size+1))) if (!(parser->buff= (char*) alloc_root(mem_root, (size_t)(stat_info.st_size+1))))
{ {
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@ -392,7 +392,7 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root,
} }
if ((len= my_read(file, (uchar *)parser->buff, if ((len= my_read(file, (uchar *)parser->buff,
stat_info.st_size, MYF(MY_WME))) == (size_t) stat_info.st_size, MYF(MY_WME))) ==
MY_FILE_ERROR) MY_FILE_ERROR)
{ {
my_close(file, MYF(MY_WME)); my_close(file, MYF(MY_WME));

View File

@ -9540,7 +9540,7 @@ double JOIN_TAB::scan_time()
else else
{ {
found_records= records=table->file->stats.records; found_records= records=table->file->stats.records;
read_time= found_records ? found_records: 10;// TODO:fix this stub read_time= found_records ? (double)found_records: 10.0;// TODO:fix this stub
res= read_time; res= read_time;
} }
return res; return res;