diff options
author | tijl <tijl@FreeBSD.org> | 2012-03-09 16:39:34 +0000 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2012-03-09 16:39:34 +0000 |
commit | beb3f0289d04fd667addc616aff5bc478063cc6c (patch) | |
tree | ac385dc9b176daf821d63bff63f971cd4979d980 /sys/x86 | |
parent | 777fe4aad20d933a0ada87680499bede1ef705e2 (diff) | |
download | FreeBSD-src-beb3f0289d04fd667addc616aff5bc478063cc6c.zip FreeBSD-src-beb3f0289d04fd667addc616aff5bc478063cc6c.tar.gz |
Cast the expression in __bswap16(x) to __uint16_t because it is promoted
to int.
Reviewed by: dim
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/include/endian.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/x86/include/endian.h b/sys/x86/include/endian.h index 4db6009..ba101fa 100644 --- a/sys/x86/include/endian.h +++ b/sys/x86/include/endian.h @@ -70,8 +70,8 @@ (((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32)) #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P -#define __bswap16(x) \ - (__builtin_constant_p(x) ? \ +#define __bswap16(x) \ + (__uint16_t)(__builtin_constant_p(x) ? \ __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)) #define __bswap32(x) \ (__builtin_constant_p(x) ? \ |