gdi: Cast-qual warnings fix (1 of 3)

Andrew Talbot Andrew.Talbot at talbotville.com
Wed Sep 13 18:58:30 CDT 2006


Changelog:
    gdi: Cast-qual warnings fix.

diff -urN a/dlls/gdi/bitmap.c b/dlls/gdi/bitmap.c
--- a/dlls/gdi/bitmap.c	2006-05-23 13:47:58.000000000 +0100
+++ b/dlls/gdi/bitmap.c	2006-09-12 23:12:57.000000000 +0100
@@ -439,7 +439,7 @@
             {
                 dest -= dib->dsBm.bmWidthBytes;
                 memcpy( dest, bits, min( count, dib->dsBm.bmWidthBytes ) );
-                bits = (char *)bits + dib->dsBm.bmWidthBytes;
+                bits = (const char *)bits + dib->dsBm.bmWidthBytes;
                 count -= dib->dsBm.bmWidthBytes;
             }
         }
diff -urN a/dlls/gdi/brush.c b/dlls/gdi/brush.c
--- a/dlls/gdi/brush.c	2006-05-23 13:47:58.000000000 +0100
+++ b/dlls/gdi/brush.c	2006-09-13 20:53:49.000000000 +0100
@@ -273,7 +273,7 @@
  */
 HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
 {
-    BITMAPINFO *info=(BITMAPINFO*)data;
+    const BITMAPINFO *info=(const BITMAPINFO*)data;
     LOGBRUSH logbrush;
 
     if (!data)
diff -urN a/dlls/gdi/dib.c b/dlls/gdi/dib.c
--- a/dlls/gdi/dib.c	2006-06-19 11:44:43.000000000 +0100
+++ b/dlls/gdi/dib.c	2006-09-13 20:57:49.000000000 +0100
@@ -129,7 +129,7 @@
 
     if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
     {
-        BITMAPCOREHEADER *core = (BITMAPCOREHEADER *)info;
+        const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)info;
         colors = (core->bcBitCount <= 8) ? 1 << core->bcBitCount : 0;
         return sizeof(BITMAPCOREHEADER) + colors *
              ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBTRIPLE) : sizeof(WORD));
@@ -168,7 +168,7 @@
     }
     if (header->biSize == sizeof(BITMAPCOREHEADER))
     {
-        BITMAPCOREHEADER *core = (BITMAPCOREHEADER *)header;
+        const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)header;
         *width  = core->bcWidth;
         *height = core->bcHeight;
         *planes = core->bcPlanes;
@@ -179,7 +179,7 @@
     }
     if (header->biSize == sizeof(BITMAPV4HEADER))
     {
-        BITMAPV4HEADER *v4hdr = (BITMAPV4HEADER *)header;
+        const BITMAPV4HEADER *v4hdr = (const BITMAPV4HEADER *)header;
         *width  = v4hdr->bV4Width;
         *height = v4hdr->bV4Height;
         *planes = v4hdr->bV4Planes;
@@ -190,7 +190,7 @@
     }
     if (header->biSize == sizeof(BITMAPV5HEADER))
     {
-        BITMAPV5HEADER *v5hdr = (BITMAPV5HEADER *)header;
+        const BITMAPV5HEADER *v5hdr = (const BITMAPV5HEADER *)header;
         *width  = v5hdr->bV5Width;
         *height = v5hdr->bV5Height;
         *planes = v5hdr->bV5Planes;



More information about the wine-patches mailing list