From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40641 invoked by alias); 11 Oct 2018 14:42:57 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 40538 invoked by uid 9078); 11 Oct 2018 14:42:56 -0000 Date: Thu, 11 Oct 2018 14:42:00 -0000 Message-ID: <20181011144256.40536.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib/libc/ctype/jp2uc.c: Declare "cs" variable as "const char *" X-Act-Checkin: newlib-cygwin X-Git-Author: Christophe Lyon X-Git-Refname: refs/heads/master X-Git-Oldrev: 103b055035fea328f8bc7826801760fb1c055683 X-Git-Newrev: 4f7a6c326aab3dfff139ad848c45210c3f097317 X-SW-Source: 2018-q4/txt/msg00016.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4f7a6c326aab3dfff139ad848c45210c3f097317 commit 4f7a6c326aab3dfff139ad848c45210c3f097317 Author: Christophe Lyon Date: Fri Oct 5 09:11:05 2018 +0000 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. Diff: --- newlib/libc/ctype/jp2uc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/ctype/jp2uc.c b/newlib/libc/ctype/jp2uc.c index b89b5ea..5e30f09 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"))