*\r
* \return Input value with the byte ordering reversed.\r
*/\r
- #define SWAPENDIAN_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))\r
+ #define SWAPENDIAN_16(x) (uint16_t)((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))\r
\r
/** Swaps the byte ordering of a 32-bit value at compile-time. Do not use this macro for swapping byte orderings\r
* of dynamic values computed at runtime- use \ref SwapEndian_32() instead. The result of this macro can be used\r
*\r
* \return Input value with the byte ordering reversed.\r
*/\r
- #define SWAPENDIAN_32(x) ((((x) & 0xFF000000UL) >> 24UL) | (((x) & 0x00FF0000UL) >> 8UL) | \\r
- (((x) & 0x0000FF00UL) << 8UL) | (((x) & 0x000000FFUL) << 24UL))\r
+ #define SWAPENDIAN_32(x) (uint32_t)((((x) & 0xFF000000UL) >> 24UL) | (((x) & 0x00FF0000UL) >> 8UL) | \\r
+ (((x) & 0x0000FF00UL) << 8UL) | (((x) & 0x000000FFUL) << 24UL))\r
\r
#if defined(ARCH_BIG_ENDIAN) && !defined(le16_to_cpu)\r
#define le16_to_cpu(x) SwapEndian_16(x)\r