Andrew Talbot : gdi32: Cast-qual warnings fix.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 30 05:22:19 CST 2006


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

Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date:   Sun Oct 29 17:23:11 2006 +0000

gdi32: Cast-qual warnings fix.

---

 dlls/gdi32/env.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/gdi32/env.c b/dlls/gdi32/env.c
index 8e582eb..ecac6f6 100644
--- a/dlls/gdi32/env.c
+++ b/dlls/gdi32/env.c
@@ -114,7 +114,8 @@ INT16 WINAPI SetEnvironment16(LPCSTR lpP
 {
     ATOM atom;
     BOOL16 nullport = FALSE;
-    LPSTR p;
+    LPCSTR port_name;
+    LPSTR device_mode;
     ENVTABLE *env;
     HGLOBAL16 handle;
 
@@ -131,20 +132,20 @@ INT16 WINAPI SetEnvironment16(LPCSTR lpP
     }
     if (nCount) { /* store DEVMODE struct */
 	if (nullport)
-	    p = (LPSTR)lpdev;
+	    port_name = (LPSTR)lpdev;
         else
-	    p = (LPSTR)lpPortName;
+	    port_name = lpPortName;
 
-        if ((atom = PortNameToAtom(p, TRUE))
+        if ((atom = PortNameToAtom(port_name, TRUE))
 	 && (env = SearchEnvTable(0))
 	 && (handle = GlobalAlloc16(GMEM_SHARE|GMEM_MOVEABLE, nCount))) {
-	    if (!(p = GlobalLock16(handle))) {
+	    if (!(device_mode = GlobalLock16(handle))) {
 	        GlobalFree16(handle);
 	        return 0;
 	    }
 	    env->atom = atom;
 	    env->handle = handle;
-            memcpy(p, lpdev, nCount);
+            memcpy(device_mode, lpdev, nCount);
             GlobalUnlock16(handle);
             return handle;
 	}




More information about the wine-cvs mailing list