PATCH: dsurface/dib.c casts
Marcus Meissner
marcus at jet.franken.de
Sun Jul 4 08:23:35 CDT 2004
Hi,
Replaced lvalue casts constructs by constructs supported by gcc HEAD.
Removed superflous *s = (type *)sbuf assignment spotted by compiler.
Ciao, Marcus
Changelog:
COPY_COLORKEY_FX: Do not use lvalue casts.
Index: dlls/ddraw/dsurface/dib.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/dib.c,v
retrieving revision 1.34
diff -u -r1.34 dib.c
--- dlls/ddraw/dsurface/dib.c 16 Mar 2004 19:41:50 -0000 1.34
+++ dlls/ddraw/dsurface/dib.c 4 Jul 2004 13:20:38 -0000
@@ -749,16 +749,16 @@
}
#define COPY_COLORKEY_FX(type) { \
- type *s = (type *) sbuf, *d = (type *) dbuf, *dx, tmp; \
+ type *s, *d = (type *) dbuf, *dx, tmp; \
for (y = sy = 0; y < dstheight; y++, sy += yinc) { \
- (LPBYTE)s = sbase + (sy >> 16) * sdesc.u1.lPitch; \
- (LPBYTE)dx = d; \
+ s = (type*)(sbase + (sy >> 16) * sdesc.u1.lPitch); \
+ dx = d; \
for (x = sx = 0; x < dstwidth; x++, sx += xinc) { \
tmp = s[sx >> 16]; \
if (tmp < keylow || tmp > keyhigh) dx[0] = tmp; \
- (LPBYTE)dx += dstxinc; \
- } \
- (LPBYTE)d += dstyinc; \
+ dx = (type*)(((LPBYTE)dx)+dstxinc); \
+ } \
+ d = (type*)(((LPBYTE)d)+dstyinc); \
} \
break; }
--
More information about the wine-patches
mailing list