diff options
Diffstat (limited to 'strings/dtoa.c')
-rw-r--r-- | strings/dtoa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/strings/dtoa.c b/strings/dtoa.c index d11c5e346c5..d893d8e4bce 100644 --- a/strings/dtoa.c +++ b/strings/dtoa.c @@ -91,7 +91,7 @@ size_t my_fcvt(double x, int precision, char *to, my_bool *error) int decpt, sign, len, i; char *res, *src, *end, *dst= to; char buf[DTOA_BUFF_SIZE]; - DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL); + DBUG_ASSERT(precision >= 0 && precision < DECIMAL_NOT_SPECIFIED && to != NULL); res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); @@ -106,7 +106,7 @@ size_t my_fcvt(double x, int precision, char *to, my_bool *error) } src= res; - len= end - src; + len= (int)(end - src); if (sign) *dst++= '-'; @@ -238,7 +238,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to, *error= FALSE; src= res; - len= end - res; + len= (int)(end - res); /* Number of digits in the exponent from the 'e' conversion. @@ -330,7 +330,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to, dtoa_free(res, buf, sizeof(buf)); res= dtoa(x, 5, width - decpt, &decpt, &sign, &end, buf, sizeof(buf)); src= res; - len= end - res; + len= (int)(end - res); } if (len == 0) @@ -396,7 +396,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to, dtoa_free(res, buf, sizeof(buf)); res= dtoa(x, 4, width, &decpt, &sign, &end, buf, sizeof(buf)); src= res; - len= end - res; + len= (int)(end - res); if (--decpt < 0) decpt= -decpt; } |