comdlg32: Cast-qual warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Fri Sep 1 14:22:35 CDT 2006


This patch is dependent on my earlier constifying patches to kernel.
The first (32-bit) parameter of ConvertDialog32To16() should be read-only;
the third (16-bit), writeable.
---
Changelog:
    comdlg32: Cast-qual warnings fix.

diff -urN a/dlls/comdlg32/colordlg16.c b/dlls/comdlg32/colordlg16.c
--- a/dlls/comdlg32/colordlg16.c	2006-05-23 13:47:41.000000000 +0100
+++ b/dlls/comdlg32/colordlg16.c	2006-08-31 18:56:28.000000000 +0100
@@ -400,7 +400,7 @@
     HANDLE16 hDlgTmpl16 = 0, hResource16 = 0;
     HGLOBAL16 hGlobal16 = 0;
     BOOL16 bRet = FALSE;
-    LPCVOID template;
+    LPVOID template;
     FARPROC16 ptr;
 
     TRACE("ChooseColor\n");
@@ -458,7 +458,7 @@
             GlobalFree16(hGlobal16);
             return FALSE;
         }
-        ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
+        ConvertDialog32To16(template32, size, template);
         hDlgTmpl16 = hGlobal16;
     }
 
diff -urN a/dlls/comdlg32/filedlg16.c b/dlls/comdlg32/filedlg16.c
--- a/dlls/comdlg32/filedlg16.c	2006-05-23 13:47:41.000000000 +0100
+++ b/dlls/comdlg32/filedlg16.c	2006-08-30 20:44:29.000000000 +0100
@@ -89,7 +89,7 @@
 {
     PFD16_PRIVATE priv = (PFD16_PRIVATE) lfs->private1632;
     LPOPENFILENAME16 ofn16 = priv->ofn16;
-    LPCVOID template;
+    LPVOID template;
     HGLOBAL16 hGlobal16 = 0;
 
     if (ofn16->Flags & OFN_ENABLETEMPLATEHANDLE)
@@ -146,7 +146,7 @@
             GlobalFree16(hGlobal16);
             return FALSE;
         }
-        ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
+        ConvertDialog32To16(template32, size, template);
         priv->hDlgTmpl16 = hGlobal16;
         priv->hGlobal16 = hGlobal16;
     }
diff -urN a/dlls/comdlg32/finddlg16.c b/dlls/comdlg32/finddlg16.c
--- a/dlls/comdlg32/finddlg16.c	2006-06-09 17:17:42.000000000 +0100
+++ b/dlls/comdlg32/finddlg16.c	2006-09-01 19:50:05.000000000 +0100
@@ -137,7 +137,7 @@
             GlobalFree16(hGlobal16);
             return FALSE;
         }
-        ConvertDialog32To16((LPVOID)template32, size, (LPVOID)lfr->template);
+        ConvertDialog32To16(template32, size, lfr->template);
         lfr->hDlgTmpl16 = hGlobal16;
         lfr->hGlobal16 = hGlobal16;
     }
diff -urN a/dlls/comdlg32/fontdlg16.c b/dlls/comdlg32/fontdlg16.c
--- a/dlls/comdlg32/fontdlg16.c	2006-05-23 13:47:41.000000000 +0100
+++ b/dlls/comdlg32/fontdlg16.c	2006-09-01 19:49:55.000000000 +0100
@@ -167,7 +167,7 @@
     HANDLE16 hDlgTmpl16 = 0, hResource16 = 0;
     HGLOBAL16 hGlobal16 = 0;
     BOOL16 bRet = FALSE;
-    LPCVOID template;
+    LPVOID template;
     FARPROC16 ptr;
     CHOOSEFONTW cf32w;
     LOGFONTW lf32w;
@@ -241,7 +241,7 @@
             GlobalFree16(hGlobal16);
             return FALSE;
         }
-        ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
+        ConvertDialog32To16(template32, size, template);
         hDlgTmpl16 = hGlobal16;
 
     }
diff -urN a/dlls/comdlg32/printdlg16.c b/dlls/comdlg32/printdlg16.c
--- a/dlls/comdlg32/printdlg16.c	2006-06-14 12:54:55.000000000 +0100
+++ b/dlls/comdlg32/printdlg16.c	2006-09-01 19:52:12.000000000 +0100
@@ -260,7 +260,7 @@
             GlobalFree16(hGlobal16);
             return 0;
         }
-        ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
+        ConvertDialog32To16(template32, size, template);
         GlobalUnlock16(hGlobal16);
         return hGlobal16;
 }



More information about the wine-patches mailing list