I’m porting my application from OAT 3.02 (EDLib) to OAT 3.12 and WIP library on a Fastrack 1306B (firmware 6.57).
I’m using Visual C++ and I don’t have any warnings in Debug mode.
Using gcc in Wismo Target mode, I’m facing many warnings like :
“warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness”
I don’t like warnings I think it’s related to the default sign of char.
‘unsigned char’ ? ‘signed char’ ?
does anyone succeed to use gcc compilation flag to force char’s sign ?
Yes, I am just doing almost exactly the same thing - I’m going from v3.03 to v3.12.
In fact, that is the only warning I get - but lots of them!
The warnings didn’t happen with OAT v3.03 - it seems that Wavecom are now using a different version of GCC (4.0.1) , and it’s more picky about this!
Absolutely - especially when there’s 93 of them!
I think you’re right, but the warnings happen only in function calls wherever I’ve passed a specifically unsigned char actual parameter, but the function has an unadorned char formal parameter - particularly the standard string functions like strlen, strcpy, etc (and the wm_… equivalents).
Note that it only happens with pointers to char.
I couldn’t find anything.
I tried adding -funsignedchar to the GCC options, but it made no difference - it seems that this doesn’t affect references via pointers.
The only solution I’ve come up with is to go through all my definitions and make sure that I use plain char where the data type is really “text/characters”, and only specify signed/unsigned where the data is pure binary numerical values.
Note that Wavecom provide the ascii typedef for this purpose - so the 3 types are: ascii - ASCII-coded text/characters; u8 - unsigned 8-bit binary data; s8 - signed 8-bit binary data.
You will then just have to add a few casts where you pass ascii variables to funcions that handle data just as binary bytes; eg, adl_fcmSendData.
this is not true, in visual studio you can do that, but to do this double click in results window not in task window and the line it will be selected and show, i am talking about visual studio 2003, i do not know in previuos versions.