summaryrefslogtreecommitdiff
path: root/sql-common/my_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common/my_time.c')
-rw-r--r--sql-common/my_time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 5571b87e08a..d7953fe36bf 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -202,7 +202,7 @@ static uint skip_digits(const char **str, const char *end)
while (s < end && my_isdigit(&my_charset_latin1, *s))
s++;
*str= s;
- return s - start;
+ return (uint)(s - start);
}
@@ -236,7 +236,7 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status,
uint tmp= 0; /* For the case '10:10:10.' */
if (get_digits(&tmp, number_of_fields, str, end, 6))
status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
- if ((status->precision= (*str - start)) < 6)
+ if ((status->precision= (uint)(*str - start)) < 6)
*val= (ulong) (tmp * log_10_int[6 - (*str - start)]);
else
*val= tmp;
@@ -358,7 +358,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
const char *start= str;
if (get_number(&l_time->year, &number_of_fields, &str, end))
status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
- year_length= str - start;
+ year_length= (uint)(str - start);
if (!status->warnings &&
(get_punct(&str, end)