summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-19 05:09:10 +0300
committerunknown <monty@mysql.com>2004-05-19 05:09:10 +0300
commita41883facfdda411441cc868d2af278360c3dbe5 (patch)
tree57ccf880c409f526096a1fbd30b165d14a22f473 /strings
parent3fba03f345e0d121280e38e64cf74016ab9af474 (diff)
downloadmariadb-git-a41883facfdda411441cc868d2af278360c3dbe5.tar.gz
Portability fixes
Fixed wrong number of warnings/duplicates for machines with high-byte-first client/mysql.cc: Remove not used variables client/mysqltest.c: Remove double ; myisam/ft_nlq_search.c: Fix valgrind error (not fatal) myisam/rt_test.c: Portability fix mysql-test/r/rpl_trunc_binlog.result: Portability fix mysql-test/t/rpl_trunc_binlog.test: Portability fix (Column 23 was different on openbsd) sql/sql_insert.cc: Fixed wrong number of warnings/duplicates for machines with high-byte-first strings/ctype-big5.c: Portability fix strings/ctype-gbk.c: Portability fix strings/ctype-mb.c: Portability fix strings/ctype-uca.c: Portability fix tests/client_test.c: Portability fixes
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-big5.c10
-rw-r--r--strings/ctype-gbk.c8
-rw-r--r--strings/ctype-mb.c2
-rw-r--r--strings/ctype-uca.c6
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)