public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib/libc/ctype/jp2uc.c: Declare "cs" variable as "const char *" Date: Thu, 11 Oct 2018 14:42:00 -0000 [thread overview] Message-ID: <20181011144256.40536.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4f7a6c326aab3dfff139ad848c45210c3f097317 commit 4f7a6c326aab3dfff139ad848c45210c3f097317 Author: Christophe Lyon <christophe.lyon@linaro.org> 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"))
reply other threads:[~2018-10-11 14:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181011144256.40536.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).