[Nut-upsdev] gcc4 compiler warnings
clepple at gmail.com
Fri Feb 10 02:31:42 UTC 2006
On 2/9/06, Arjen de Korte <nut+devel at de-korte.org> wrote:
> This is due to the fact that some drivers need to pass character values
> between 0x80 and 0xFF to or from the drivers, but the serial functions use
> signed chars. Unless some drivers use negative values, my preference would
> be to fix/create serial functions (to use unsigned chars), rather than to
> convert the characters between 0x80 and 0xFF to negative numbers.
> Especially where status bits are used, listing a hex value is more
> readable then.
I tend to agree with Arjen on this one - most drivers will be treating
characters as unsigned, since the majority of the values being
returned are unsigned. The only exceptions I know about are the ones
that Peter mentioned in libHID, and that code is a mess anyway.
Is there a reason why the common serial functions should return signed
- Charles Lepple
More information about the Nut-upsdev