From 035f34c99b58b8f80302fac492c17a9af7f5e545 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 12 Jul 2004 19:46:24 +0000 Subject: [PATCH] Replaced lvalue casts / postincrement mixes. --- dlls/x11drv/dib_convert.c | 8 +++++--- dlls/x11drv/dib_src_swap.c | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/x11drv/dib_convert.c b/dlls/x11drv/dib_convert.c index 32025654d34..11e3ecb47f1 100644 --- a/dlls/x11drv/dib_convert.c +++ b/dlls/x11drv/dib_convert.c @@ -1188,7 +1188,8 @@ static void convert_0888_to_888_asis(int width, int height, for (x=0; x> 16; /* l */ } srcbits = (char*)srcbits + srclinebytes; @@ -1239,8 +1240,9 @@ static void convert_0888_to_888_reverse(int width, int height, for (x=0; x> 16) & 0x00ff) | /* h */ - (srcval & 0xff00); /* g */ + *((WORD*)dstbyte)=((srcval >> 16) & 0x00ff) | /* h */ + (srcval & 0xff00); /* g */ + dstbyte += sizeof(WORD); *dstbyte++=srcval; /* l */ } srcbits = (char*)srcbits + srclinebytes; diff --git a/dlls/x11drv/dib_src_swap.c b/dlls/x11drv/dib_src_swap.c index 29ef4017d01..9bfaf265710 100644 --- a/dlls/x11drv/dib_src_swap.c +++ b/dlls/x11drv/dib_src_swap.c @@ -1360,7 +1360,8 @@ static void convert_0888_to_888_asis_src_byteswap(int width, int height, DWORD srcval; srcval=*srcpixel++; FLIP_DWORD(&srcval); - *((WORD*)dstbyte)++=srcval; /* h, g */ + *((WORD*)dstbyte)=srcval; /* h, g */ + dstbyte+=sizeof(WORD); *dstbyte++=srcval >> 16; /* l */ } srcbits = (char*)srcbits + srclinebytes; @@ -1405,7 +1406,8 @@ static void convert_0888_to_888_reverse_src_byteswap(int width, int height, for (x=0; x> 8) & 0xffff); /* g, h */ + *((WORD*)dstbyte)=((srcval >> 8) & 0xffff); /* g, h */ + dstbyte+=sizeof(WORD); *dstbyte++= srcval >> 24; /* l */ } srcbits = (char*)srcbits + srclinebytes;