[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#488884: Root of the problem is __bswap_constant_16



The following:

unsigned short int x= 1234;
x= __bswap_constant_16(x);

Will throw the warning. To fix, you need to change:

#define __bswap_constant_16(x) \
     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))

To:

#define __bswap_constant_16(x) \
     ((((x) >> 8) & 0xff) | (unsigned short int)(((x) & 0xff) << 8))

-Eric



Reply to: