[En-Nut-Discussion] Yagarto from 23.12.2009 and newlib again...

Ulrich Prinz uprinz2 at netscape.net
Sun Jan 31 16:15:08 CET 2010


Ok, in building Nut/OS it is a bit different than in compiling user 
software. So here is the log from Nut/OS Configurator:

cc1.exe: warnings being treated as errors
../../nut/pro/httpopt.c: In function 'NutHttpURLEncode':
../../nut/pro/httpopt.c:129: error: array subscript has type 'char'
../../nut/pro/httpopt.c:140: error: array subscript has type 'char'
make[1]: *** [httpopt.o] Error 1
make: *** [all] Error 2
13:38:45: ----- 'make all' failed with error 2 -----

Reason for the complain is:
         if (!isalnum(*ptr1) || *ptr1 == '%' || *ptr1 == '&'|| ...

While *ptr1 is
register char *ptr1, *ptr2;
isalnum() expects an int pointer.

This only an example of one function from the newlib that insists on 
getting the right pointer type. There are 20..30 more of them touching 
some different string related functions from the newlib.

Best regards,

Ole Reinhardt schrieb:
> Hi!
>> I installed a fresh yagarto and now run into these compatibility issues 
>> for newlib.
>> I solved the first problems by using 
>> http://www.ethernut.de/pdf/enswm28e.pdf page 23.
> Right... It's a mess, but we can't detect the library version
> automatically by the preprocessor.
>> But I got stuck on these incompatibilities of char and int:
>> "warning: assignment makes pointer from integer without a cast"
>> I have quite several of these while building Nut/OS.
> Please post a log here. "... makes pointer from integer without a cast"
> is a real error in most cases (mostly missing dereferencing)
> Bye,
> Ole

More information about the En-Nut-Discussion mailing list