public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix return type of __locale_ctype_ptr_l()
@ 2020-11-16 13:40 Sebastian Huber
  2020-11-16 15:01 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Huber @ 2020-11-16 13:40 UTC (permalink / raw)
  To: newlib

This prevents warnings like this:

ctype.h:118:9: warning: return discards 'const' qualifier from pointer
  target type
---
 newlib/libc/include/ctype.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
index 8b1013ac0..932a567e2 100644
--- a/newlib/libc/include/ctype.h
+++ b/newlib/libc/include/ctype.h
@@ -111,7 +111,7 @@ const char *__locale_ctype_ptr (void);
 #ifdef __HAVE_LOCALE_INFO__
 const char *__locale_ctype_ptr_l (locale_t);
 #else
-static __inline char *
+static __inline const char *
 __locale_ctype_ptr_l(locale_t _l)
 {
 	(void)_l;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix return type of __locale_ctype_ptr_l()
  2020-11-16 13:40 [PATCH] Fix return type of __locale_ctype_ptr_l() Sebastian Huber
@ 2020-11-16 15:01 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2020-11-16 15:01 UTC (permalink / raw)
  To: newlib

On Nov 16 14:40, Sebastian Huber wrote:
> This prevents warnings like this:
> 
> ctype.h:118:9: warning: return discards 'const' qualifier from pointer
>   target type
> ---
>  newlib/libc/include/ctype.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
> index 8b1013ac0..932a567e2 100644
> --- a/newlib/libc/include/ctype.h
> +++ b/newlib/libc/include/ctype.h
> @@ -111,7 +111,7 @@ const char *__locale_ctype_ptr (void);
>  #ifdef __HAVE_LOCALE_INFO__
>  const char *__locale_ctype_ptr_l (locale_t);
>  #else
> -static __inline char *
> +static __inline const char *
>  __locale_ctype_ptr_l(locale_t _l)
>  {
>  	(void)_l;
> -- 
> 2.26.2

Looks good


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-16 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 13:40 [PATCH] Fix return type of __locale_ctype_ptr_l() Sebastian Huber
2020-11-16 15:01 ` Corinna Vinschen

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).