]> sourceware.org Git - newlib-cygwin.git/commitdiff
newlib/libc/ctype/jp2uc.c: Declare "cs" variable as "const char *"
authorChristophe Lyon <christophe.lyon@linaro.org>
Fri, 5 Oct 2018 09:11:05 +0000 (09:11 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 11 Oct 2018 14:32:14 +0000 (16:32 +0200)
Instead of "char *" to avoid compiler warnings.
This is OK because "cs" is only used as input of strcmp.

newlib/libc/ctype/jp2uc.c

index b89b5eaf47ab1dc53e399e86f039f24f45e1a0b4..5e30f09bedcd4e29fb80fb10bf9e6c9d572b9ab2 100644 (file)
@@ -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"))
This page took 0.033473 seconds and 5 git commands to generate.