Henri Verbeet : d3d9: Fix some sign compare warnings.

Alexandre Julliard julliard at winehq.org
Mon Mar 9 09:40:43 CDT 2009


Module: wine
Branch: master
Commit: 1b9a6fb4e9f5a76f1ca352bef121689df02d9289
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1b9a6fb4e9f5a76f1ca352bef121689df02d9289

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Mar  9 14:31:29 2009 +0100

d3d9: Fix some sign compare warnings.

---

 dlls/d3d9/tests/device.c            |    7 ++-----
 dlls/d3d9/tests/query.c             |    2 +-
 dlls/d3d9/tests/vertexdeclaration.c |    4 ++--
 dlls/d3d9/tests/visual.c            |    4 ++--
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 702b776..4b09316 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -79,11 +79,8 @@ static int get_refcount(IUnknown *object)
         if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); \
     }
 
-static void check_mipmap_levels(
-    IDirect3DDevice9* device, 
-    int width, int height, int count) 
+static void check_mipmap_levels(IDirect3DDevice9 *device, UINT width, UINT height, UINT count)
 {
-
     IDirect3DBaseTexture9* texture = NULL;
     HRESULT hr = IDirect3DDevice9_CreateTexture( device, width, height, 0, 0, 
         D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, (IDirect3DTexture9**) &texture, NULL );
@@ -2049,7 +2046,7 @@ static void test_display_formats(void)
 static void test_scissor_size(void)
 {
     IDirect3D9 *d3d9_ptr = 0;
-    int i;
+    unsigned int i;
     static const struct {
         int winx; int winy; int backx; int backy; BOOL window;
     } scts[] = { /* scissor tests */
diff --git a/dlls/d3d9/tests/query.c b/dlls/d3d9/tests/query.c
index c4e7874..51a8668 100644
--- a/dlls/d3d9/tests/query.c
+++ b/dlls/d3d9/tests/query.c
@@ -83,7 +83,7 @@ static void test_query_support(IDirect3D9 *pD3d, HWND hwnd)
     IDirect3DDevice9      *pDevice = NULL;
     D3DPRESENT_PARAMETERS d3dpp;
     D3DDISPLAYMODE        d3ddm;
-    int                   i;
+    unsigned int i;
     IDirect3DQuery9       *pQuery = NULL;
     BOOL supported;
 
diff --git a/dlls/d3d9/tests/vertexdeclaration.c b/dlls/d3d9/tests/vertexdeclaration.c
index 4207cbe..bf10459 100644
--- a/dlls/d3d9/tests/vertexdeclaration.c
+++ b/dlls/d3d9/tests/vertexdeclaration.c
@@ -750,7 +750,7 @@ static void test_vertex_declaration_alignment(
 
     HRESULT hr;
     IDirect3DVertexDeclaration9* result_decl = NULL;
-    int i;
+    unsigned int i;
 
     CONST D3DVERTEXELEMENT9 test_elements[5][3] =
     {
@@ -796,7 +796,7 @@ static void test_unused_type(
 
     HRESULT hr;
     IDirect3DVertexDeclaration9* result_decl = NULL;
-    int i;
+    unsigned int i;
 
     static const D3DVERTEXELEMENT9 test_elements[][3] =
     {
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index cf589a5..3564de3 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -9101,11 +9101,11 @@ static void stream_test(IDirect3DDevice9 *device)
     hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, (D3DSTREAMSOURCE_INSTANCEDATA | 0));
     ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr);
     hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind);
-    ok(hr == D3D_OK && ind == (0 | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr);
+    ok(hr == D3D_OK && ind == (0U | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr);
     hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, (D3DSTREAMSOURCE_INSTANCEDATA | D3DSTREAMSOURCE_INDEXEDDATA | 0));
     ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr);
     hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind);
-    ok(hr == D3D_OK && ind == (0 | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr);
+    ok(hr == D3D_OK && ind == (0U | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr);
 
     /* set the default value back */
     hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, 1);




More information about the wine-cvs mailing list