Andrew Talbot : setupapi: Cast-qual warning fix.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 14 05:14:14 CST 2006


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

Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date:   Mon Nov 13 21:09:21 2006 +0000

setupapi: Cast-qual warning fix.

---

 dlls/setupapi/virtcopy.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/setupapi/virtcopy.c b/dlls/setupapi/virtcopy.c
index 51a6356..f92b455 100644
--- a/dlls/setupapi/virtcopy.c
+++ b/dlls/setupapi/virtcopy.c
@@ -91,6 +91,7 @@ VHSTR WINAPI vsmStringAdd16(LPCSTR lpszN
     VHSTR n;
     VHSTR index = 0xffff;
     HANDLE heap;
+    LPSTR str;
 
     TRACE("add string '%s'\n", lpszName);
     /* search whether string already inserted */
@@ -137,8 +138,9 @@ VHSTR WINAPI vsmStringAdd16(LPCSTR lpszN
     if (!vhstrlist[index])
 	vhstrlist[index] = HeapAlloc(heap, HEAP_ZERO_MEMORY, sizeof(VHSTR_STRUCT));
     vhstrlist[index]->refcount = 1;
-    vhstrlist[index]->pStr = HeapAlloc(heap, 0, strlen(lpszName)+1);
-    strcpy((LPSTR)vhstrlist[index]->pStr, lpszName);
+    str = HeapAlloc(heap, 0, strlen(lpszName)+1);
+    strcpy(str, lpszName);
+    vhstrlist[index]->pStr = str;
     return index;
 }
 




More information about the wine-cvs mailing list