[Nut-upsdev] gcc4 compiler warnings
Arjen de Korte
nut+devel at de-korte.org
Fri Feb 10 15:04:55 UTC 2006
> On a side note: The signedness of char differs betweeen OS's. On some,
> char's are signed and on some char's are unsigned. If you really
> depend on the signedness to be what you expect, use signed char or
> unsigned char...
It seems that we have come to the conclusion that we want unsigned char's.
> So, if you force stuff to be either signed or unsigned you'll probably
> get warnings when using strcmp et al on architectures that are
> different from the one the developer used.
Not neccessarily. It only means that when you use these functions, it is a
good idea to typecast whatever you put into them with (char *) to make it
conform to whatever the OS uses.
Regards, Arjen
More information about the Nut-upsdev
mailing list