[patch] misc. warning fixes

Ralf Corsepius ralf.corsepius@rtems.org
Tue Aug 23 04:48:00 GMT 2011


On 08/22/2011 06:18 PM, Corinna Vinschen wrote:
> On Aug 20 06:38, Ralf Corsepius wrote:
>> Hi,
>>
>> I'd like to apply the patch below.
>>
>> It addresses misc. warnings gcc issues when building newlib.
>>
>> Ralf
>
>> 2011-08-20  Ralf Cors??pius<...>
>>
>> 	* libc/posix/regexec.c: Define "nope" only #ifndef NDEBUG.
>> 	* libc/stdio/vfscanf.c: Define "state" only #ifdef _MB_CAPABLE.
>> 	* libc/string/wcwidth.c: Include<wctypes.h>  for "iswprint" and
>> 	"iswcntrl".
>
> The latter two are ok.  For the first one, I think we should just
> remove `nope'.  It's not used anywhere in regexec.c, nor is NDEBUG.

Both are used:

# grep nope libc/posix/*
libc/posix/engine.c:			assert(nope);
...
libc/posix/regexec.c:static int nope = 0;		/* for use in asserts; shuts 
lint up */

(Using "assert()" implies using NDEBUG)


What's confusing about this, is engine.c actually being a private header 
of regexec.c;
# grep engine.c libc/posix/*
..
libc/posix/regexec.c:#include "engine.c"
libc/posix/regexec.c:#include "engine.c"


Ralf



More information about the Newlib mailing list