diff options
author | unknown <georg@lmy002.wdf.sap.corp> | 2005-06-13 12:41:15 +0200 |
---|---|---|
committer | unknown <georg@lmy002.wdf.sap.corp> | 2005-06-13 12:41:15 +0200 |
commit | ba144e2290e100c02d9f4f4648d8ce1cabbdde77 (patch) | |
tree | 0a4d130bc8c5eb5d2582f3864b50584de7a5647f /strings/decimal.c | |
parent | 871977f26f523a3587c24273e3ebc61ccd26890f (diff) | |
download | mariadb-git-ba144e2290e100c02d9f4f4648d8ce1cabbdde77.tar.gz |
fixes for windows 64-bit compiler warnings
heap/hp_hash.c:
fix for windows 64-bit compiler warnings
heap/hp_update.c:
fix for windows 64-bit compiler warnings
mysys/default.c:
fix for windows 64-bit compiler warnings
mysys/default_modify.c:
fix for windows 64-bit compiler warnings
mysys/mf_iocache.c:
fix for windows 64-bit compiler warnings
mysys/mf_keycache.c:
fix for windows 64-bit compiler warnings
mysys/my_alloc.c:
fix for windows 64-bit compiler warnings
mysys/my_getopt.c:
fix for windows 64-bit compiler warnings
mysys/my_mmap.c:
fix for windows 64-bit compiler warnings
mysys/my_once.c:
fix for windows 64-bit compiler warnings
mysys/string.c:
fix for windows 64-bit compiler warnings
sql-common/client.c:
fix for windows 64-bit compiler warnings
sql/field.cc:
fix for windows 64-bit compiler warnings
sql/gstream.cc:
fix for windows 64-bit compiler warnings
sql/ha_myisam.cc:
fix for windows 64-bit compiler warnings
sql/ha_myisammrg.cc:
fix for windows 64-bit compiler warnings
sql/item.cc:
fix for windows 64-bit compiler warnings
sql/item.h:
fix for windows 64-bit compiler warnings
sql/item_cmpfunc.cc:
fix for windows 64-bit compiler warnings
sql/password.c:
fix for windows 64-bit compiler warnings
sql/set_var.h:
fix for windows 64-bit compiler warnings
strings/ctype-big5.c:
fix for windows 64-bit compiler warnings
strings/ctype-bin.c:
fix for windows 64-bit compiler warnings
strings/ctype-cp932.c:
fix for windows 64-bit compiler warnings
strings/ctype-eucjpms.c:
fix for windows 64-bit compiler warnings
strings/ctype-mb.c:
fix for windows 64-bit compiler warnings
strings/ctype-simple.c:
fix for windows 64-bit compiler warnings
strings/ctype-sjis.c:
fix for windows 64-bit compiler warnings
strings/ctype-uca.c:
fix for windows 64-bit compiler warnings
strings/ctype-ucs2.c:
fix for windows 64-bit compiler warnings
strings/ctype-ujis.c:
fix for windows 64-bit compiler warnings
strings/ctype-utf8.c:
fix for windows 64-bit compiler warnings
strings/ctype.c:
fix for windows 64-bit compiler warnings
strings/decimal.c:
fix for windows 64-bit compiler warnings
strings/xml.c:
fix for windows 64-bit compiler warnings
Diffstat (limited to 'strings/decimal.c')
-rw-r--r-- | strings/decimal.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index 4a487f3c9b0..8d07a84ede1 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -472,7 +472,7 @@ static void digits_bounds(decimal_t *from, int *start_result, int *end_result) else { i= DIG_PER_DEC1 - 1; - start= (buf_beg - from->buf) * DIG_PER_DEC1; + start= (int) ((buf_beg - from->buf) * DIG_PER_DEC1); } if (buf_beg < end) for (; *buf_beg < powers10[i--]; start++) ; @@ -484,13 +484,13 @@ static void digits_bounds(decimal_t *from, int *start_result, int *end_result) /* find non-zero decimal digit from the end */ if (buf_end == end - 1 && from->frac) { - stop= ((buf_end - from->buf) * DIG_PER_DEC1 + - (i= ((from->frac - 1) % DIG_PER_DEC1 + 1))); + stop= (int) (((buf_end - from->buf) * DIG_PER_DEC1 + + (i= ((from->frac - 1) % DIG_PER_DEC1 + 1)))); i= DIG_PER_DEC1 - i + 1; } else { - stop= (buf_end - from->buf + 1) * DIG_PER_DEC1; + stop= (int) ((buf_end - from->buf + 1) * DIG_PER_DEC1); i= 1; } for (; *buf_end % powers10[i++] == 0; stop--); @@ -794,13 +794,13 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed) s1=s; while (s < end_of_string && my_isdigit(&my_charset_latin1, *s)) s++; - intg=s-s1; + intg= (int) (s-s1); if (s < end_of_string && *s=='.') { endp= s+1; while (endp < end_of_string && my_isdigit(&my_charset_latin1, *endp)) endp++; - frac= endp - s - 1; + frac= (int) (endp - s - 1); } else { @@ -1715,14 +1715,14 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) while (buf1 < stop1 && *buf1 == 0) buf1++; start1=buf1; - intg1=stop1-buf1; + intg1= (int) (stop1-buf1); } if (unlikely(*buf2 == 0)) { while (buf2 < stop2 && *buf2 == 0) buf2++; start2=buf2; - intg2=stop2-buf2; + intg2= (int) (stop2-buf2); } if (intg2 > intg1) carry=1; @@ -1734,8 +1734,8 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) end1--; while (unlikely((buf2 <= end2) && (*end2 == 0))) end2--; - frac1= (end1 - stop1) + 1; - frac2= (end2 - stop2) + 1; + frac1= (int) (end1 - stop1) + 1; + frac2= (int) (end2 - stop2) + 1; while (buf1 <=end1 && buf2 <= end2 && *buf1 == *buf2) buf1++, buf2++; if (buf1 <= end1) @@ -2086,7 +2086,7 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2, /* removing end zeroes */ while (*stop2 == 0 && stop2 >= start2) stop2--; - len2= stop2++ - start2; + len2= (int) (stop2++ - start2); /* calculating norm2 (normalized *start2) - we need *start2 to be large @@ -2173,7 +2173,7 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2, if (dcarry) *--start1=dcarry; buf0=to->buf; - intg0=ROUND_UP(prec1-frac1)-(start1-tmp1); + intg0=(int) (ROUND_UP(prec1-frac1)-(start1-tmp1)); frac0=ROUND_UP(to->frac); error=E_DEC_OK; if (unlikely(frac0==0 && intg0==0)) |