Incompatible pointer type warning in libc/reent

Sebastian Huber sebastian.huber@embedded-brains.de
Thu Aug 11 08:56:00 GMT 2016


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.



More information about the Newlib mailing list