Module: wine Branch: master Commit: bc718eec9e247fe293d32ab2d9edc28808629ffa URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc718eec9e247fe293d32ab2d9...
Author: Andrew Talbot Andrew.Talbot@talbotville.com Date: Sat Dec 16 14:52:36 2006 +0000
winhelp: Cast-qual warnings fix.
---
programs/winhelp/hlpfile.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index e95dfdf..59f55d1 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -452,10 +452,12 @@ static BOOL HLPFILE_AddPage(HLPFILE *hlp while (ptr < page->lpszTitle + titlesize) { unsigned len = strlen(ptr); + char* macro_str; + WINE_TRACE("macro: %s\n", ptr); macro = HeapAlloc(GetProcessHeap(), 0, sizeof(HLPFILE_MACRO) + len + 1); - macro->lpszMacro = (char*)(macro + 1); - memcpy((char*)macro->lpszMacro, ptr, len + 1); + macro->lpszMacro = macro_str = (char*)(macro + 1); + memcpy(macro_str, ptr, len + 1); /* FIXME: shall we really link macro in reverse order ?? * may produce strange results when played at page opening */ @@ -822,6 +824,7 @@ static HLPFILE_LINK* HLPFILE_Alloc BOOL clrChange, unsigned wnd) { HLPFILE_LINK* link; + char* link_str;
/* FIXME: should build a string table for the attributes.link.lpszPath * they are reallocated for each link @@ -830,8 +833,8 @@ static HLPFILE_LINK* HLPFILE_Alloc if (!link) return NULL;
link->cookie = cookie; - link->lpszString = (char*)link + sizeof(HLPFILE_LINK); - strcpy((char*)link->lpszString, str); + link->lpszString = link_str = (char*)link + sizeof(HLPFILE_LINK); + strcpy(link_str, str); link->lHash = hash; link->bClrChange = clrChange ? 1 : 0; link->window = wnd;