dbghelp: Cast-qual warnings fix (1 of 2)
Andrew Talbot
Andrew.Talbot at talbotville.com
Sat Oct 28 11:26:18 CDT 2006
Changelog:
dbghelp: Cast-qual warnings fix.
diff -urN a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c
--- a/dlls/dbghelp/path.c 2006-07-13 16:13:33.000000000 +0100
+++ b/dlls/dbghelp/path.c 2006-10-28 16:06:46.000000000 +0100
@@ -349,6 +349,7 @@
struct process* pcs = process_find_by_handle(hProcess);
char tmp[MAX_PATH];
char* ptr;
+ char* buf;
const char* filename;
const char* searchPath = inSearchPath;
@@ -360,7 +361,6 @@
if (!searchPath)
{
unsigned len = WideCharToMultiByte(CP_ACP, 0, pcs->search_path, -1, NULL, 0, NULL, NULL);
- char* buf;
searchPath = buf = HeapAlloc(GetProcessHeap(), 0, len);
if (!searchPath) return FALSE;
@@ -382,7 +382,7 @@
{
strcpy(buffer, full_path);
if (searchPath != inSearchPath)
- HeapFree(GetProcessHeap(), 0, (char*)searchPath);
+ HeapFree(GetProcessHeap(), 0, buf);
return TRUE;
}
@@ -404,11 +404,11 @@
{
strcpy(buffer, tmp);
if (searchPath != inSearchPath)
- HeapFree(GetProcessHeap(), 0, (char*)searchPath);
+ HeapFree(GetProcessHeap(), 0, buf);
return TRUE;
}
}
if (searchPath != inSearchPath)
- HeapFree(GetProcessHeap(), 0, (char*)searchPath);
+ HeapFree(GetProcessHeap(), 0, buf);
return FALSE;
}
More information about the wine-patches
mailing list