dlls/ddraw/executebuffer.c: silence compiler warnings
Gerald Pfeifer
gerald at pfeifer.com
Sat May 9 08:26:37 CDT 2009
Future versions of GCC will issue the following warnings in our default
invocation, that is, without any additional options on top of what we
already use:
executebuffer.c:230: warning: comparison between 'D3DRENDERSTATETYPE' and 'enum _D3DTRANSFORMSTATETYPE'
executebuffer.c:232: warning: comparison between 'D3DRENDERSTATETYPE' and 'enum _D3DTRANSFORMSTATETYPE'
executebuffer.c:234: warning: comparison between 'D3DRENDERSTATETYPE' and 'enum _D3DTRANSFORMSTATETYPE'
This patch addresses these.
Gerald
ChangeLog:
Add three missing casts to enum _D3DTRANSFORMSTATETYPE to
IDirect3DExecuteBufferImpl_Execute().
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 3ff794d..4247c02 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -227,11 +227,14 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
} else if(lpDevice->Handles[ci->u2.dwArg[0] - 1].type != DDrawHandle_Matrix) {
ERR("Handle %d is not a matrix handle\n", ci->u2.dwArg[0]);
} else {
- if(ci->u1.drstRenderStateType == D3DTRANSFORMSTATE_WORLD)
+ if((enum _D3DTRANSFORMSTATETYPE)ci->u1.drstRenderStateType
+ == D3DTRANSFORMSTATE_WORLD)
lpDevice->world = ci->u2.dwArg[0];
- if(ci->u1.drstRenderStateType == D3DTRANSFORMSTATE_VIEW)
+ if((enum _D3DTRANSFORMSTATETYPE)ci->u1.drstRenderStateType
+ == D3DTRANSFORMSTATE_VIEW)
lpDevice->view = ci->u2.dwArg[0];
- if(ci->u1.drstRenderStateType == D3DTRANSFORMSTATE_PROJECTION)
+ if((enum _D3DTRANSFORMSTATETYPE)ci->u1.drstRenderStateType
+ == D3DTRANSFORMSTATE_PROJECTION)
lpDevice->proj = ci->u2.dwArg[0];
IDirect3DDevice7_SetTransform((IDirect3DDevice7 *)lpDevice,
ci->u1.drstRenderStateType, (LPD3DMATRIX)lpDevice->Handles[ci->u2.dwArg[0] - 1].ptr);
More information about the wine-patches
mailing list