dbghelp: Cast-qual warnings fix (2 of 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Oct 28 11:27:26 CDT 2006


Changelog:
    dbghelp: Cast-qual warnings fix.

diff -urN a/dlls/dbghelp/source.c b/dlls/dbghelp/source.c
--- a/dlls/dbghelp/source.c	2006-06-20 11:26:01.000000000 +0100
+++ b/dlls/dbghelp/source.c	2006-10-28 17:11:54.000000000 +0100
@@ -59,6 +59,7 @@
     int         len;
     unsigned    ret;
     const char* full;
+    char*       tmp;
 
     if (!name) return (unsigned)-1;
     if (!base || *name == '/')
@@ -66,8 +67,8 @@
     else
     {
         unsigned bsz = strlen(base);
-        char* tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1);
 
+        tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1);
         if (!tmp) return (unsigned)-1;
         full = tmp;
         strcpy(tmp, base);
@@ -92,7 +93,7 @@
     strcpy(module->sources + module->sources_used, full);
     module->sources_used += len;
     module->sources[module->sources_used] = '\0';
-    if (full != name) HeapFree(GetProcessHeap(), 0, (char*)full);
+    if (full != name) HeapFree(GetProcessHeap(), 0, tmp);
     return ret;
 }
 



More information about the wine-patches mailing list