gdi32: Sign-compare warnings fix

Andrew Talbot andrew.talbot at talbotville.com
Thu Oct 2 16:18:38 CDT 2008


Changelog:
    gdi32: Sign-compare warnings fix.

diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c
index 94061f8..a38fdd9 100644
--- a/dlls/gdi32/bitmap.c
+++ b/dlls/gdi32/bitmap.c
@@ -335,7 +335,7 @@ LONG WINAPI GetBitmapBits(
         DIBSECTION *dib = bmp->dib;
         const char *src = dib->dsBm.bmBits;
         INT width_bytes = BITMAP_GetWidthBytes(dib->dsBm.bmWidth, dib->dsBm.bmBitsPixel);
-        DWORD max = width_bytes * bmp->bitmap.bmHeight;
+        LONG max = width_bytes * bmp->bitmap.bmHeight;
 
         if (!bits)
         {
@@ -451,7 +451,7 @@ LONG WINAPI SetBitmapBits(
     {
         DIBSECTION *dib = bmp->dib;
         char *dest = dib->dsBm.bmBits;
-        DWORD max = dib->dsBm.bmWidthBytes * dib->dsBm.bmHeight;
+        LONG max = dib->dsBm.bmWidthBytes * dib->dsBm.bmHeight;
         if (count > max) count = max;
         ret = count;
 
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 440857d..299e27a 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -1193,8 +1193,7 @@ HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, const BITMAPINFO *bmi, UINT16 us
 static void DIB_CopyColorTable( DC *dc, BITMAPOBJ *bmp, WORD coloruse, const BITMAPINFO *info )
 {
     RGBQUAD *colorTable;
-    unsigned int colors;
-    int i;
+    unsigned int colors, i;
     BOOL core_info = info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER);
 
     if (core_info)



More information about the wine-patches mailing list