From d48204c9c307b3809df6e9c2604923a78536aeaf Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Tue, 11 May 2004 07:34:03 +0000 Subject: [PATCH] fix compiler warning/error "a cast does not yield a lvalue" git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@694 423420c4-83ab-492f-b58f-81f9feb106b5 --- bitmap.c | 2 +- xwin.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bitmap.c b/bitmap.c index 583aa99..aa7b202 100644 --- a/bitmap.c +++ b/bitmap.c @@ -38,7 +38,7 @@ #define CVAL2(p, v) { v = (*(p++)) << 8; v |= (*(p++)); } #endif /* L_ENDIAN */ #else -#define CVAL2(p, v) v = (*(((uint16*)p)++)); +#define CVAL2(p, v) { v = (*((uint16*)p)); p += 2; } #endif /* NEED_ALIGN */ #define UNROLL8(exp) { exp exp exp exp exp exp exp exp } diff --git a/xwin.c b/xwin.c index 7cb9bbe..133612c 100644 --- a/xwin.c +++ b/xwin.c @@ -252,7 +252,7 @@ translate8to16(uint8 * data, uint8 * out, uint8 * end) uint16 value; if (g_arch_match) - REPEAT(*(((uint16 *) out)++) = g_colmap[*(data++)]; + REPEAT(*((uint16*)out) = g_colmap[*(data++)]; out += 2; ) else if (g_xserver_be) { @@ -308,7 +308,7 @@ translate8to32(uint8 * data, uint8 * out, uint8 * end) uint32 value; if (g_arch_match) - REPEAT(*(((uint32 *) out)++) = g_colmap[*(data++)]; + REPEAT(*((uint32 *)out) = g_colmap[*(data++)]; out += 4; ) else if (g_xserver_be) {