diff options
-rw-r--r-- | strings/ctype-gbk.c | 2 | ||||
-rw-r--r-- | strings/ctype-simple.c | 8 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index a4bcce19432..7caef07202d 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -9969,7 +9969,7 @@ uint my_well_formed_len_gbk(CHARSET_INFO *cs __attribute__((unused)), break; } } - return b - b0; + return (uint) (b - b0); } diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 85f792b5607..208c38edd30 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -1090,7 +1090,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq) if (*str == '.') { for(str++ ; str != end && *str == '0' ; str++); - return (ulong) (str-str0); + return (ulong) (str - str0); } return 0; @@ -1100,7 +1100,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq) if (!my_isspace(cs,*str)) break; } - return (ulong) (str-str0); + return (ulong) (str - str0); default: return 0; } @@ -1117,14 +1117,14 @@ void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)), uint my_numchars_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *b, const char *e) { - return (uint) (e-b); + return (uint) (e - b); } uint my_numcells_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *b, const char *e) { - return (uint) (e-b); + return (uint) (e - b); } diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 76e91b89c25..1c12df08b32 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -213,7 +213,7 @@ static int my_strnncoll_sjis_internal(CHARSET_INFO *cs, uint a_char= sjiscode(*a, *(a+1)); uint b_char= sjiscode(*b, *(b+1)); if (a_char != b_char) - return a_char - b_char; + return (int) a_char - (int) b_char; a += 2; b += 2; } else |