summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-11 20:52:00 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-12 16:41:54 +0200
commita2290919533df16afdfdbd0679f80734b5a36109 (patch)
treef8fd2c0a4e367e3767e3b22beb382fae1d6f414f /strings
parent7ae555c1148f190f91d00499c2541fe7c2d4f555 (diff)
downloadmariadb-git-a2290919533df16afdfdbd0679f80734b5a36109.tar.gz
potential signedness issue
different fix for 07a33cdcef: Bug #23296299 : HANDLE_FATAL_SIGNAL (SIG=11) IN MY_TOSORT_UTF32
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-ucs2.c14
-rw-r--r--strings/ctype-utf8.c8
2 files changed, 11 insertions, 11 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index a79f5899ec5..ca6f53f3f8d 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2003, 2013, Oracle and/or its affiliates
- Copyright (c) 2009, 2014, SkySQL Ab.
+ Copyright (c) 2009, 2016, MariaDB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -1098,7 +1098,7 @@ my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
static inline void
my_tolower_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256 && uni_plane[page])
*wc= uni_plane[page][*wc & 0xFF].tolower;
}
@@ -1107,7 +1107,7 @@ my_tolower_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
static inline void
my_toupper_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256 && uni_plane[page])
*wc= uni_plane[page][*wc & 0xFF].toupper;
}
@@ -1116,7 +1116,7 @@ my_toupper_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
static inline void
my_tosort_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256)
{
if (uni_plane[page])
@@ -1727,7 +1727,7 @@ my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)),
static inline void
my_tolower_utf32(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256 && uni_plane[page])
*wc= uni_plane[page][*wc & 0xFF].tolower;
}
@@ -1736,7 +1736,7 @@ my_tolower_utf32(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
static inline void
my_toupper_utf32(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256 && uni_plane[page])
*wc= uni_plane[page][*wc & 0xFF].toupper;
}
@@ -1745,7 +1745,7 @@ my_toupper_utf32(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
static inline void
my_tosort_utf32(MY_UNICASE_INFO *const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256)
{
if (uni_plane[page])
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 2dd7f5e6b92..f2782657bea 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2013, Monty Program Ab
+ Copyright (c) 2009, 2016, MariaDB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -1939,7 +1939,7 @@ MY_UNICASE_INFO *const my_unicase_turkish[256]=
static inline void
my_tosort_unicode(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256)
{
if (uni_plane[page])
@@ -5024,7 +5024,7 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
static inline void
my_tolower_utf8mb4(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256 && uni_plane[page])
*wc= uni_plane[page][*wc & 0xFF].tolower;
}
@@ -5033,7 +5033,7 @@ my_tolower_utf8mb4(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
static inline void
my_toupper_utf8mb4(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc)
{
- int page= *wc >> 8;
+ uint page= *wc >> 8;
if (page < 256 && uni_plane[page])
*wc= uni_plane[page][*wc & 0xFF].toupper;
}