Commit db941dd0 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dbghelp: Cast-qual warnings fix.

parent 7da1d6d1
...@@ -59,6 +59,7 @@ unsigned source_new(struct module* module, const char* base, const char* name) ...@@ -59,6 +59,7 @@ unsigned source_new(struct module* module, const char* base, const char* name)
int len; int len;
unsigned ret; unsigned ret;
const char* full; const char* full;
char* tmp = NULL;
if (!name) return (unsigned)-1; if (!name) return (unsigned)-1;
if (!base || *name == '/') if (!base || *name == '/')
...@@ -66,8 +67,8 @@ unsigned source_new(struct module* module, const char* base, const char* name) ...@@ -66,8 +67,8 @@ unsigned source_new(struct module* module, const char* base, const char* name)
else else
{ {
unsigned bsz = strlen(base); 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; if (!tmp) return (unsigned)-1;
full = tmp; full = tmp;
strcpy(tmp, base); strcpy(tmp, base);
...@@ -92,7 +93,7 @@ unsigned source_new(struct module* module, const char* base, const char* name) ...@@ -92,7 +93,7 @@ unsigned source_new(struct module* module, const char* base, const char* name)
strcpy(module->sources + module->sources_used, full); strcpy(module->sources + module->sources_used, full);
module->sources_used += len; module->sources_used += len;
module->sources[module->sources_used] = '\0'; module->sources[module->sources_used] = '\0';
if (full != name) HeapFree(GetProcessHeap(), 0, (char*)full); HeapFree(GetProcessHeap(), 0, tmp);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment