From fdba8b85931b19427880fa294ad22b48a856f5d3 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Thu, 20 Nov 2008 22:13:48 +0000 Subject: [PATCH] wined3d: Sign-compare warnings fix. --- dlls/wined3d/context.c | 10 +++++----- dlls/wined3d/device.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 62a4bf4d7bd..acfe36b7b35 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -191,7 +191,7 @@ static void context_check_fbo_status(IWineD3DDevice *iface) TRACE("FBO complete\n"); } else { IWineD3DSurfaceImpl *attachment; - int i; + unsigned int i; FIXME("FBO status %s (%#x)\n", debug_fbostatus(status), status); /* Dump the FBO attachments */ @@ -446,7 +446,8 @@ static WineD3DContext *AddContextToArray(IWineD3DDeviceImpl *This, HWND win_hand /* This function takes care of WineD3D pixel format selection. */ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DFORMAT ColorFormat, WINED3DFORMAT DepthStencilFormat, BOOL auxBuffers, int numSamples, BOOL pbuffer, BOOL findCompatible) { - int iPixelFormat=0, matchtry; + int iPixelFormat=0; + unsigned int matchtry; short redBits, greenBits, blueBits, alphaBits, colorBits; short depthBits=0, stencilBits=0; @@ -1214,7 +1215,7 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex * *****************************************************************************/ static WineD3DContext *findThreadContextForSwapChain(IWineD3DSwapChain *swapchain, DWORD tid) { - int i; + unsigned int i; for(i = 0; i < ((IWineD3DSwapChainImpl *) swapchain)->num_contexts; i++) { if(((IWineD3DSwapChainImpl *) swapchain)->context[i]->tid == tid) { @@ -1475,8 +1476,7 @@ static void apply_draw_buffer(IWineD3DDeviceImpl *This, IWineD3DSurface *target, *****************************************************************************/ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextUsage usage) { DWORD tid = GetCurrentThreadId(); - int i; - DWORD dirtyState, idx; + DWORD i, dirtyState, idx; BYTE shift; WineD3DContext *context; const struct StateEntry *StateTable = This->StateTable; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 83bc436dce9..0cb539b7b47 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1152,8 +1152,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface if(hr!= WINED3D_OK) { /* clean up */ - int k; - int l; + unsigned int k; + unsigned int l; for (l = 0; l < j; l++) { IWineD3DSurface_Release(object->surfaces[l][i]); } @@ -1573,7 +1573,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice* iface, * Create the back, front and stencil buffers *******************/ if(object->presentParms.BackBufferCount > 0) { - int i; + UINT i; object->backBuffer = HeapAlloc(GetProcessHeap(), 0, sizeof(IWineD3DSurface *) * object->presentParms.BackBufferCount); if(!object->backBuffer) { @@ -1667,7 +1667,7 @@ error: } if (object->backBuffer) { - int i; + UINT i; for(i = 0; i < object->presentParms.BackBufferCount; i++) { if(object->backBuffer[i]) { IWineD3DSurface_GetParent(object->backBuffer[i], &bufferParent); @@ -3623,7 +3623,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantF( UINT count) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i; + UINT i; TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -3663,7 +3663,7 @@ CONST float *srcData, UINT count) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i; + UINT i; TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4052,7 +4052,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantF( UINT count) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i; + UINT i; TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4092,7 +4092,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantF_DirtyConst( UINT count) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i; + UINT i; TRACE("(iface %p, srcData %p, start %d, count %d)\n", iface, srcData, start, count); @@ -4148,7 +4148,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo WINED3DVIEWPORT vp; WINED3DMATRIX mat, proj_mat, view_mat, world_mat; BOOL doClip; - int numTextures; + DWORD numTextures; if (lpStrideData->u.s.normal.lpData) { WARN(" lighting state not saved yet... Some strange stuff may happen !\n"); @@ -7187,7 +7187,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE pPresentationParameters->BackBufferHeight != swapchain->presentParms.BackBufferHeight)) { WINED3DVIEWPORT vp; - int i; + UINT i; vp.X = 0; vp.Y = 0;