[PATCH] wined3d: Dont just print a FIXME on error, handle it (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Jun 11 10:26:56 CDT 2011


Hi,

We print a FIXME for an out of bounds array access ... but then let
it happily run into it. Just return success instead. CID 5115

(StefanD said return OK is fine. Windows apparently crashes and burns
here, but we want to help the static analyzers not to go crazy here.)

Ciao, Marcus
---
 dlls/wined3d/device.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5bc5a08..a888657 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1874,9 +1874,14 @@ HRESULT CDECL wined3d_device_multiply_transform(struct wined3d_device *device,
      * If this is found to be wrong, change to StateBlock. */
 
     if (state <= HIGHEST_TRANSFORMSTATE)
+    {
         mat = &device->updateStateBlock->state.transforms[state];
+    }
     else
+    {
         FIXME("Unhandled transform state %#x.\n", state);
+        return WINED3D_OK;
+    }
 
     multiply_matrix(&temp, mat, matrix);
 
-- 
1.7.3.4




More information about the wine-patches mailing list