From ce4746a8a815fa225010bcf268b34c56daf93beb Mon Sep 17 00:00:00 2001 From: kraxel Date: Mon, 14 Aug 2006 13:06:13 +0000 Subject: printf warnings --- rd/read-xwd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'rd') 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 -- cgit