aboutsummaryrefslogtreecommitdiffstats
path: root/rd/read-xwd.c
diff options
context:
space:
mode:
authorkraxel <kraxel>2006-08-14 13:06:13 +0000
committerkraxel <kraxel>2006-08-14 13:06:13 +0000
commitce4746a8a815fa225010bcf268b34c56daf93beb (patch)
treef9c7f83a0181c28d07213f1f848ec1ec493633cc /rd/read-xwd.c
parent1a6826559a5ef384e62d9447bd1a7014805e7d08 (diff)
downloadfbida-ce4746a8a815fa225010bcf268b34c56daf93beb.tar.gz
printf warnings
Diffstat (limited to 'rd/read-xwd.c')
-rw-r--r--rd/read-xwd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rd/read-xwd.c b/rd/read-xwd.c
index 8d15cf3..ac254eb 100644
--- a/rd/read-xwd.c
+++ b/rd/read-xwd.c
@@ -20,12 +20,12 @@
# define be16_to_cpu(x) (x)
# define be32_to_cpu(x) (x)
#elif BYTE_ORDER == LITTLE_ENDIAN
-# define be16_to_cpu(x) (((x>>8) & 0x00ff) |\
- ((x<<8) & 0xff00))
-# define be32_to_cpu(x) (((x>>24) & 0x000000ff) |\
- ((x>>8) & 0x0000ff00) |\
- ((x<<8) & 0x00ff0000) |\
- ((x<<24) & 0xff000000))
+# define be16_to_cpu(x) ((((uint16_t)x>>8) & 0x00ff) |\
+ (((uint16_t)x<<8) & 0xff00))
+# define be32_to_cpu(x) ((((uint32_t)x>>24) & 0x000000ff) |\
+ (((uint32_t)x>>8) & 0x0000ff00) |\
+ (((uint32_t)x<<8) & 0x00ff0000) |\
+ (((uint32_t)x<<24) & 0xff000000))
#else
# error "Oops: unknown byte order"
#endif