aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-10-05 09:11:05 +0000
committerCorinna Vinschen <corinna@vinschen.de>2018-10-11 16:32:14 +0200
commit4f7a6c326aab3dfff139ad848c45210c3f097317 (patch)
treeeee46adeba4571ef7ee1611cee031f3d50896dd9
parent103b055035fea328f8bc7826801760fb1c055683 (diff)
newlib/libc/ctype/jp2uc.c: Declare "cs" variable as "const char *"
Instead of "char *" to avoid compiler warnings. This is OK because "cs" is only used as input of strcmp.
-rw-r--r--newlib/libc/ctype/jp2uc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/ctype/jp2uc.c b/newlib/libc/ctype/jp2uc.c
index b89b5eaf4..5e30f09be 100644
--- a/newlib/libc/ctype/jp2uc.c
+++ b/newlib/libc/ctype/jp2uc.c
@@ -166,7 +166,7 @@ __uc2jp (wint_t c, int type)
wint_t
_jp2uc_l (wint_t c, struct __locale_t * l)
{
- char * cs = l ? __locale_charset(l) : __current_locale_charset();
+ const char * cs = l ? __locale_charset(l) : __current_locale_charset();
if (0 == strcmp (cs, "JIS"))
c = __jp2uc (c, JP_JIS);
else if (0 == strcmp (cs, "SJIS"))
@@ -186,7 +186,7 @@ _jp2uc (wint_t c)
wint_t
_uc2jp_l (wint_t c, struct __locale_t * l)
{
- char * cs = l ? __locale_charset(l) : __current_locale_charset();
+ const char * cs = l ? __locale_charset(l) : __current_locale_charset();
if (0 == strcmp (cs, "JIS"))
c = __uc2jp (c, JP_JIS);
else if (0 == strcmp (cs, "SJIS"))