summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@sun.com>2010-05-26 16:12:23 +0200
committerTor Didriksen <tor.didriksen@sun.com>2010-05-26 16:12:23 +0200
commitd8536dfbddbf98df10081bdbf83b2c06cf9d01c1 (patch)
treee02f9ec4f4f64535006e2aeecf1ec1497146b50c /strings
parent33e9d05c086a54ec0cd3860acdc01585e0d4fda6 (diff)
downloadmariadb-git-d8536dfbddbf98df10081bdbf83b2c06cf9d01c1.tar.gz
Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++ Fix most warnings reported in dbg and opt mode.
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-ucs2.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index e3e13af85ef..3946f6a83b4 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1961,12 +1961,10 @@ my_strnncoll_utf32(CHARSET_INFO *cs,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc),UNINIT_VAR(t_wc);
const uchar *se= s + slen;
const uchar *te= t + tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
while (s < se && t < te)
{
@@ -2028,11 +2026,9 @@ my_strnncollsp_utf32(CHARSET_INFO *cs,
my_bool diff_if_only_endspace_difference)
{
int res;
- my_wc_t s_wc, t_wc;
+ my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc);
const uchar *se= s + slen, *te= t + tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
DBUG_ASSERT((slen % 4) == 0);
DBUG_ASSERT((tlen % 4) == 0);
@@ -2498,11 +2494,9 @@ my_strnncoll_utf32_bin(CHARSET_INFO *cs,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
- my_wc_t s_wc, t_wc;
+ my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc);
const uchar *se= s + slen;
const uchar *te= t + tlen;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
while (s < se && t < te)
{
@@ -2624,7 +2618,7 @@ my_like_range_utf32(CHARSET_INFO *cs,
{
my_wc_t wc;
int res;
- if ((res= my_utf32_uni(cs, &wc, ptr, end)) < 0)
+ if ((res= my_utf32_uni(cs, &wc, (uchar*) ptr, (uchar*) end)) < 0)
{
my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char);
my_fill_utf32(cs, max_str, min_end - min_str, cs->max_sort_char);
@@ -2635,15 +2629,15 @@ my_like_range_utf32(CHARSET_INFO *cs,
if (wc == (my_wc_t) escape)
{
ptr+= 4; /* Skip escape */
- if ((res= my_utf32_uni(cs, &wc, ptr, end)) < 0)
+ if ((res= my_utf32_uni(cs, &wc, (uchar*) ptr, (uchar*) end)) < 0)
{
my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char);
my_fill_utf32(cs, max_str, max_end - min_str, cs->max_sort_char);
/* min_length and max_length are not important */
return TRUE;
}
- if (my_uni_utf32(cs, wc, min_str, min_end) != 4 ||
- my_uni_utf32(cs, wc, max_str, max_end) != 4)
+ if (my_uni_utf32(cs, wc, (uchar*) min_str, (uchar*) min_end) != 4 ||
+ my_uni_utf32(cs, wc, (uchar*) max_str, (uchar*) max_end) != 4)
goto pad_set_lengths;
*min_str++= 4;
*max_str++= 4;
@@ -2652,8 +2646,8 @@ my_like_range_utf32(CHARSET_INFO *cs,
if (wc == (my_wc_t) w_one)
{
- if (my_uni_utf32(cs, cs->min_sort_char, min_str, min_end) != 4 ||
- my_uni_utf32(cs, cs->max_sort_char, max_str, max_end) != 4)
+ if (my_uni_utf32(cs, cs->min_sort_char, (uchar*) min_str, (uchar*) min_end) != 4 ||
+ my_uni_utf32(cs, cs->max_sort_char, (uchar*) max_str, (uchar*) max_end) != 4)
goto pad_set_lengths;
min_str+= 4;
max_str+= 4;
@@ -2675,8 +2669,8 @@ my_like_range_utf32(CHARSET_INFO *cs,
}
/* Normal character */
- if (my_uni_utf32(cs, wc, min_str, min_end) != 4 ||
- my_uni_utf32(cs, wc, max_str, max_end) != 4)
+ if (my_uni_utf32(cs, wc, (uchar*) min_str, (uchar*) min_end) != 4 ||
+ my_uni_utf32(cs, wc, (uchar*) max_str, (uchar*) max_end) != 4)
goto pad_set_lengths;
min_str+= 4;
max_str+= 4;
@@ -2704,7 +2698,7 @@ my_scan_utf32(CHARSET_INFO *cs,
for ( ; str < end; )
{
my_wc_t wc;
- int res= my_utf32_uni(cs, &wc, str, end);
+ int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end);
if (res < 0 || wc != ' ')
break;
str+= res;
@@ -3008,7 +3002,7 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs,
my_bool t_is_prefix)
{
int s_res,t_res;
- my_wc_t UNINIT_VAR(s_wc),t_wc;
+ my_wc_t UNINIT_VAR(s_wc),UNINIT_VAR(t_wc);
const uchar *se=s+slen;
const uchar *te=t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
@@ -3195,7 +3189,7 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs,
my_bool t_is_prefix)
{
int s_res,t_res;
- my_wc_t UNINIT_VAR(s_wc),t_wc;
+ my_wc_t UNINIT_VAR(s_wc),UNINIT_VAR(t_wc);
const uchar *se=s+slen;
const uchar *te=t+tlen;