From 1b9a6fb4e9f5a76f1ca352bef121689df02d9289 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 9 Mar 2009 14:31:29 +0100 Subject: [PATCH] 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 702b77671a6..4b09316acfc 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 c4e7874d1b7..51a86686395 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 4207cbeecd6..bf10459cc66 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 cf589a5a48f..3564de3aad1 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);