[newlib-cygwin] Fix return type of __locale_ctype_ptr_l()

Sebastian Huber sh@sourceware.org
Mon Nov 16 18:35:33 GMT 2020


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

commit 14a1e7ce4288b8d3fde1359c73cb8805bcdf78a6
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Mon Nov 16 14:38:22 2020 +0100

    Fix return type of __locale_ctype_ptr_l()
    
    This prevents warnings like this:
    
    ctype.h:118:9: warning: return discards 'const' qualifier from pointer
      target type

Diff:
---
 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;


More information about the Newlib-cvs mailing list