Stefan Dösinger : ddraw: Fix some compiler warnings.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 27 04:53:25 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 53fc3f6acc032884a9d450396b3635172074b123
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=53fc3f6acc032884a9d450396b3635172074b123

Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date:   Mon Jun 26 23:15:55 2006 +0200

ddraw: Fix some compiler warnings.

---

 dlls/ddraw/device.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 9dfe344..a3436d9 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1833,7 +1833,8 @@ Thunk_IDirect3DDeviceImpl_2_Begin(IDirec
         case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break;
         case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break;
         default:
-            assert(0);  /* Should never happen */
+            ERR("Unexpected vertex type %d\n", dwVertexTypeDesc);
+            return DDERR_INVALIDPARAMS;  /* Should never happen */
     };
 
     return IDirect3DDevice3_Begin(ICOM_INTERFACE(This, IDirect3DDevice3),
@@ -1893,7 +1894,8 @@ Thunk_IDirect3DDeviceImpl_2_BeginIndexed
         case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break;
         case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break;
         default:
-            assert(0);  /* Should never happen */
+            ERR("Unexpected vertex type %d\n", d3dvtVertexType);
+            return DDERR_INVALIDPARAMS;  /* Should never happen */
     };
 
     return IDirect3DDevice3_BeginIndexed(ICOM_INTERFACE(This,IDirect3DDevice3),
@@ -2758,7 +2760,8 @@ Thunk_IDirect3DDeviceImpl_2_DrawPrimitiv
         case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break;
         case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break;
         default:
-            assert(0);  /* Should never happen */
+            ERR("Unexpected vertex type %d\n", VertexType);
+            return DDERR_INVALIDPARAMS;  /* Should never happen */
     }
 
     return IDirect3DDevice7_DrawPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7),
@@ -2898,7 +2901,8 @@ Thunk_IDirect3DDeviceImpl_2_DrawIndexedP
         case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break;
         case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break;
         default:
-            assert(0);  /* Should never happen */
+            ERR("Unexpected vertex type %d\n", VertexType);
+            return DDERR_INVALIDPARAMS;  /* Should never happen */
     }
 
     return IDirect3DDevice7_DrawIndexedPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7),




More information about the wine-cvs mailing list