winhelp: Cast-qual warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Dec 16 08:52:36 CST 2006


Changelog:
    winhelp: Cast-qual warnings fix.

diff -urN a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c
--- a/programs/winhelp/hlpfile.c	2006-10-27 17:25:26.000000000 +0100
+++ b/programs/winhelp/hlpfile.c	2006-12-16 14:51:28.000000000 +0000
@@ -452,10 +452,12 @@
     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 @@
                                              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 @@
     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;



More information about the wine-patches mailing list