Andrew Talbot : wined3d: Sign-compare warnings fix.

Alexandre Julliard julliard at winehq.org
Tue Dec 2 11:02:02 CST 2008


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Mon Dec  1 22:19:43 2008 +0000

wined3d: Sign-compare warnings fix.

---

 dlls/wined3d/surface.c       |    7 +++----
 dlls/wined3d/surface_gdi.c   |    2 +-
 dlls/wined3d/swapchain.c     |    4 ++--
 dlls/wined3d/swapchain_gdi.c |    2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index dffd92e..2522ba9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -211,7 +211,7 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
         if (This->Flags & SFLAG_NONPOW2) {
             const BYTE *src_data;
             BYTE *dst_data;
-            int y;
+            UINT y;
             /*
              * Some games (e.g. warhammer 40k) don't work properly with the odd pitches, preventing
              * the surface pitch from being used to box non-power2 textures. Instead we have to use a hack to
@@ -2132,7 +2132,7 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4]
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
     BOOL index_in_alpha = FALSE;
     int dxVersion = ( (IWineD3DImpl *) device->wineD3D)->dxVersion;
-    int i;
+    unsigned int i;
 
     /* Old games like StarCraft, C&C, Red Alert and others use P8 render targets.
     * Reading back the RGB output each lockrect (each frame as they lock the whole screen)
@@ -2435,12 +2435,11 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface) {
 static HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, const char* filename)
 {
     FILE* f = NULL;
-    UINT i, y;
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     char *allocatedMemory;
     const char *textureRow;
     IWineD3DSwapChain *swapChain = NULL;
-    int width, height;
+    int width, height, i, y;
     GLuint tmpTexture = 0;
     DWORD color;
     /*FIXME:
diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c
index fbe881e..368710f 100644
--- a/dlls/wined3d/surface_gdi.c
+++ b/dlls/wined3d/surface_gdi.c
@@ -288,7 +288,7 @@ const char* filename)
     UINT y = 0, x = 0;
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     static char *output = NULL;
-    static int size = 0;
+    static UINT size = 0;
     const StaticPixelFormatDesc *formatEntry = getFormatDescEntry(This->resource.format, NULL, NULL);
 
     if (This->pow2Width > size) {
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index b00d35a..d1a6520 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -39,7 +39,7 @@ WINE_DECLARE_DEBUG_CHANNEL(fps);
 static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroyRenderTarget) {
     IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
     WINED3DDISPLAYMODE mode;
-    int i;
+    unsigned int i;
 
     TRACE("Destroying swapchain %p\n", iface);
 
@@ -54,7 +54,7 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
     }
 
     if(This->backBuffer) {
-        int i;
+        UINT i;
         for(i = 0; i < This->presentParms.BackBufferCount; i++) {
             IWineD3DSurface_SetContainer(This->backBuffer[i], 0);
             if(D3DCB_DestroyRenderTarget(This->backBuffer[i]) > 0) {
diff --git a/dlls/wined3d/swapchain_gdi.c b/dlls/wined3d/swapchain_gdi.c
index 6bf1c61..5968201 100644
--- a/dlls/wined3d/swapchain_gdi.c
+++ b/dlls/wined3d/swapchain_gdi.c
@@ -44,7 +44,7 @@ static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
     }
 
     if(This->backBuffer) {
-        int i;
+        UINT i;
         for(i = 0; i < This->presentParms.BackBufferCount; i++) {
             IWineD3DSurface_SetContainer(This->backBuffer[i], 0);
             if(D3DCB_DestroyRenderback(This->backBuffer[i]) > 0) {




More information about the wine-cvs mailing list