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

Michael [Plouj] Ploujnikov ploujj at gmail.com
Sat Oct 28 12:02:41 CDT 2006


On 10/28/06, Andrew Talbot <Andrew.Talbot at talbotville.com> wrote:
> 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);

>From first observation the above line seems to be missing a + before it.

>          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;
>  }
>
>
>


-- 
()  ASCII Ribbon Campaign
/\  - against HTML mail & vCards



More information about the wine-devel mailing list