[Nut-upsdev] gcc4 compiler warnings

Niklas Edmundsson nikke at acc.umu.se
Fri Feb 10 10:08:55 UTC 2006


On Thu, 9 Feb 2006, Charles Lepple wrote:

> 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.

Indeed. It didn't even occur to me that the serial functions might use 
signed char for input/output. I'm all for fixing this the proposed 
(==right) way.


/Nikke
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |     nikke at acc.umu.se
---------------------------------------------------------------------------
  Brain/Pinky '96: first the United States; then, the WROLD!!!!!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the Nut-upsdev mailing list