diff options
author | Olivier Houchard <cognet@FreeBSD.org> | 2004-11-04 19:07:28 +0000 |
---|---|---|
committer | Olivier Houchard <cognet@FreeBSD.org> | 2004-11-04 19:07:28 +0000 |
commit | eeaa69102a546479c4db5bb75704500407c650f1 (patch) | |
tree | 15d5f912de8256edf241e5207f9bec8f960db44e /sys/arm/include/endian.h | |
parent | 4cc4c8f7fe148985453b45d4a4c4d3050585b9db (diff) |
Use casts to enforce the return type of bswap16() and bswap32().
Notes
Notes:
svn path=/head/; revision=137216
Diffstat (limited to 'sys/arm/include/endian.h')
-rw-r--r-- | sys/arm/include/endian.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arm/include/endian.h b/sys/arm/include/endian.h index 135392acac21..ad666fe1704a 100644 --- a/sys/arm/include/endian.h +++ b/sys/arm/include/endian.h @@ -108,14 +108,14 @@ __bswap16_var(__uint32_t v) (((x) & 0x00ff) << 8)) #define __bswap16(x) \ - (__builtin_constant_p(x) ? \ - __bswap16_constant(x) : \ - __bswap16_var(x)) + ((__uint16_t)(__builtin_constant_p(x) ? \ + __bswap16_constant(x) : \ + __bswap16_var(x))) #define __bswap32(x) \ - (__builtin_constant_p(x) ? \ - __bswap32_constant(x) : \ - __bswap32_var(x)) + ((__uint32_t)(__builtin_constant_p(x) ? \ + __bswap32_constant(x) : \ + __bswap32_var(x))) #else #define __bswap16(x) __bswap16_var(x) |