From b792411a7af39b74152a96949dfb3ee4b1e52a40 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 5 Jul 2011 22:38:38 +0200 Subject: [PATCH] fix compile warnings --- sql/parse_file.cc | 4 ++-- sql/sql_select.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/parse_file.cc b/sql/parse_file.cc index 5bc16e55ec0..3ccbfba5aff 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -381,7 +381,7 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root, 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); } @@ -392,7 +392,7 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root, } 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_close(file, MYF(MY_WME)); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3ee038e8aff..79ec2bd58d1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9540,7 +9540,7 @@ double JOIN_TAB::scan_time() else { 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; } return res;