This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Incompatible pointer type warning in libc/reent


Maybe this fixes it:

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 16716dd..35ffce1 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -435,7 +435,7 @@ extern const struct __sFILE_fake __sf_fake_stderr;
     _NULL, \
     0, \
     0, \
-    "C", \
+    _NULL, \
     _NULL, \
     _NULL, \
     0, \
@@ -659,7 +659,7 @@ struct _reent
     0, \
     "", \
     0, \
-    "C", \
+    _NULL, \
     0, \
     _NULL, \
     _NULL, \

Who defines struct _thr_locale_t? I didn't find a definition in the Newlib sources.

On 10/08/16 19:10, Yaakov Selkowitz wrote:
While building Cygwin with -Werror in CFLAGS:

newlib/libc/reent/impure.c:23:62: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] static struct _reent __ATTRIBUTE_IMPURE_DATA__ impure_data = _REENT_INIT (impure_data);
                                                              ^
newlib/libc/reent/impure.c:23:62: note: (near initialization for ‘impure_data._locale’)



--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]