Module: wine Branch: master Commit: 57d971121a7482fb70a9f960d765a8df59f15fa1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=57d971121a7482fb70a9f960d7...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Mar 10 09:19:04 2009 +0100
d3d8: Fix some sign compare warnings.
---
dlls/d3d8/tests/device.c | 11 ++++------- dlls/d3d8/tests/visual.c | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index ab21482..449348f 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -93,11 +93,8 @@ static int get_refcount(IUnknown *object) if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); \ }
-static void check_mipmap_levels( - IDirect3DDevice8* device, - int width, int height, int count) +static void check_mipmap_levels(IDirect3DDevice8 *device, UINT width, UINT height, UINT count) { - IDirect3DBaseTexture8* texture = NULL; HRESULT hr = IDirect3DDevice8_CreateTexture( device, width, height, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, (IDirect3DTexture8**) &texture ); @@ -587,8 +584,8 @@ cleanup: CHECK_RELEASE(pVertexBuffer, pDevice, --refcount); CHECK_RELEASE(pIndexBuffer, pDevice, --refcount); /* Shaders */ - if (dVertexShader != -1) IDirect3DDevice8_DeleteVertexShader( pDevice, dVertexShader ); - if (dPixelShader != -1) IDirect3DDevice8_DeletePixelShader( pDevice, dPixelShader ); + if (dVertexShader != ~0U) IDirect3DDevice8_DeleteVertexShader( pDevice, dVertexShader ); + if (dPixelShader != ~0U) IDirect3DDevice8_DeletePixelShader( pDevice, dPixelShader ); /* Textures */ CHECK_RELEASE(pTexture, pDevice, --refcount); CHECK_RELEASE(pCubeTexture, pDevice, --refcount); @@ -598,7 +595,7 @@ cleanup: CHECK_RELEASE(pImageSurface, pDevice, --refcount); CHECK_RELEASE(pRenderTarget3, pDevice, --refcount); /* Misc */ - if (dStateBlock != -1) IDirect3DDevice8_DeleteStateBlock( pDevice, dStateBlock ); + if (dStateBlock != ~0U) IDirect3DDevice8_DeleteStateBlock( pDevice, dStateBlock ); /* This will destroy device - cannot check the refcount here */ if (pSwapChain) CHECK_RELEASE_REFCOUNT( pSwapChain, 0);
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 61082e0..19bf497 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -1156,7 +1156,7 @@ static void texop_test(IDirect3DDevice8 *device) D3DCOLOR color; D3DCAPS8 caps; HRESULT hr; - int i; + unsigned int i;
static const struct { float x, y, z;