summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-28 10:38:02 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commit7354dc67737fdeb105656f5cec055da627bb9c29 (patch)
tree7cc2b5f975d5e32eb94cd1344b259ea1b24018d6 /sql/item_timefunc.cc
parent509928718d52a14739fcfb2ebf0e68b4c8e01be5 (diff)
downloadmariadb-git-7354dc67737fdeb105656f5cec055da627bb9c29.tar.gz
MDEV-13384 - misc Windows warnings fixed
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 8dbd47444f2..2724bb63eda 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -714,7 +714,7 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
{
const char *end=str+length;
uint i;
- long msec_length= 0;
+ int msec_length= 0;
while (str != end && !my_isdigit(cs,*str))
str++;
@@ -725,7 +725,7 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
const char *start= str;
for (value= 0; str != end && my_isdigit(cs, *str); str++)
value= value*10 + *str - '0';
- msec_length= 6 - (str - start);
+ msec_length= 6 - (int)(str - start);
values[i]= value;
while (str != end && !my_isdigit(cs,*str))
str++;
@@ -1061,7 +1061,7 @@ longlong Item_func_week::val_int()
if (get_arg0_date(&ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
return 0;
if (arg_count > 1)
- week_format= args[1]->val_int();
+ week_format= (uint)args[1]->val_int();
else
week_format= current_thd->variables.default_week_format;
return (longlong) calc_week(&ltime, week_mode(week_format), &year);
@@ -2456,7 +2456,7 @@ String *Item_char_typecast::copy(String *str, CHARSET_INFO *strcs)
null_value= 1; // EOM
return 0;
}
- check_truncation_with_warn(str, copier.source_end_pos() - str->ptr());
+ check_truncation_with_warn(str, (uint)(copier.source_end_pos() - str->ptr()));
return &tmp_value;
}