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: Drop incorrect const qualifier from __loadlocale parameter
Date: Wed, 10 Oct 2018 09:21:00 -0000	[thread overview]
Message-ID: <20181010091854.43226.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9479563e4836177414c995730adb96d48da9fb22

commit 9479563e4836177414c995730adb96d48da9fb22
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Oct 10 11:18:02 2018 +0200

    newlib: Drop incorrect const qualifier from __loadlocale parameter
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 newlib/libc/locale/locale.c    | 4 ++--
 newlib/libc/locale/setlocale.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 791a775..4c343e4 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -463,7 +463,7 @@ currentlocale ()
 extern void __set_ctype (struct __locale_t *, const char *charset);
 
 char *
-__loadlocale (struct __locale_t *loc, int category, const char *new_locale)
+__loadlocale (struct __locale_t *loc, int category, char *new_locale)
 {
   /* At this point a full-featured system would just load the locale
      specific data from the locale files.
@@ -506,7 +506,7 @@ __loadlocale (struct __locale_t *loc, int category, const char *new_locale)
 
 restart:
   if (!locale)
-    locale = (char *) new_locale;
+    locale = new_locale;
   else if (locale != tmp_locale)
     {
       locale = __set_locale_from_locale_alias (locale, tmp_locale);
diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h
index 25c27cf..a0c8084 100644
--- a/newlib/libc/locale/setlocale.h
+++ b/newlib/libc/locale/setlocale.h
@@ -195,7 +195,7 @@ struct __locale_t
 };
 
 #ifdef _MB_CAPABLE
-extern char *__loadlocale (struct __locale_t *, int, const char *);
+extern char *__loadlocale (struct __locale_t *, int, char *);
 extern const char *__get_locale_env(struct _reent *, int);
 #endif /* _MB_CAPABLE */


                 reply	other threads:[~2018-10-10  9:21 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=20181010091854.43226.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: link
Be 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).