diff options
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-big5.c | 10 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 8 | ||||
-rw-r--r-- | strings/ctype-mb.c | 2 | ||||
-rw-r--r-- | strings/ctype-uca.c | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 2bde29ecc47..ccb8d07e786 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -223,7 +223,7 @@ static uint16 big5strokexfrm(uint16 i) static int my_strnncoll_big5_internal(const uchar **a_res, const uchar **b_res, uint length) { - const char *a= *a_res, *b= *b_res; + const uchar *a= *a_res, *b= *b_res; while (length--) { @@ -236,10 +236,10 @@ static int my_strnncoll_big5_internal(const uchar **a_res, b+= 2; length--; } - else if (sort_order_big5[(uchar) *a++] != - sort_order_big5[(uchar) *b++]) - return ((int) sort_order_big5[(uchar) a[-1]] - - (int) sort_order_big5[(uchar) b[-1]]); + else if (sort_order_big5[*a++] != + sort_order_big5[*b++]) + return ((int) sort_order_big5[a[-1]] - + (int) sort_order_big5[b[-1]]); } *a_res= a; *b_res= b; diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 1990060e67b..577f8a33275 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2585,7 +2585,7 @@ static uint16 gbksortorder(uint16 i) int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res, uint length) { - const char *a= *a_res, *b= *b_res; + const uchar *a= *a_res, *b= *b_res; uint a_char,b_char; while (length--) @@ -2601,9 +2601,9 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res, b+= 2; length--; } - else if (sort_order_gbk[(uchar) *a++] != sort_order_gbk[(uchar) *b++]) - return ((int) sort_order_gbk[(uchar) a[-1]] - - (int) sort_order_gbk[(uchar) b[-1]]); + else if (sort_order_gbk[*a++] != sort_order_gbk[*b++]) + return ((int) sort_order_gbk[a[-1]] - + (int) sort_order_gbk[b[-1]]); } *a_res= a; *b_res= b; diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index ed772a68845..9b02cd3b3da 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -283,7 +283,7 @@ uint my_well_formed_len_mb(CHARSET_INFO *cs, while (pos) { - if ((mblen= cs->cset->mb_wc(cs, &wc, b, e)) <0) + if ((mblen= cs->cset->mb_wc(cs, &wc, (uchar*) b, (uchar*) e)) <0) break; b+= mblen; pos--; diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index ac805bf0a5a..72c28d92ca8 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -6750,8 +6750,8 @@ static int my_strnncollsp_uca(CHARSET_INFO *cs, int s_res; int t_res; - slen= cs->cset->lengthsp(cs, s, slen); - tlen= cs->cset->lengthsp(cs, t, tlen); + slen= cs->cset->lengthsp(cs, (char*) s, slen); + tlen= cs->cset->lengthsp(cs, (char*) t, tlen); my_uca_scanner_init(&sscanner, cs, s, slen); my_uca_scanner_init(&tscanner, cs, t, tlen); @@ -6796,7 +6796,7 @@ static void my_hash_sort_uca(CHARSET_INFO *cs, int s_res; my_uca_scanner scanner; - slen= cs->cset->lengthsp(cs, s, slen); + slen= cs->cset->lengthsp(cs, (char*) s, slen); my_uca_scanner_init(&scanner, cs, s, slen); while ((s_res= my_uca_scanner_next(&scanner)) >0) |