winemenubuilder: fix Clang warnings (LLVM/Clang)
Austin English
austinenglish at gmail.com
Mon Jul 25 18:27:44 CDT 2011
Initialize a variable, improve error checking, remove a dead assignment.
--
-Austin
-------------- next part --------------
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 6d627cb..0dc61a0 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -2951,7 +2951,7 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link
{
char *link_name = NULL, *icon_name = NULL;
DWORD csidl = -1;
- LPWSTR urlPath;
+ LPWSTR urlPath = NULL;
char *escaped_urlPath = NULL;
HRESULT hr;
HANDLE hSem = NULL;
@@ -3348,7 +3348,7 @@ static void cleanup_menus(void)
dataSize *= 2;
HeapFree(GetProcessHeap(), 0, value);
HeapFree(GetProcessHeap(), 0, data);
- value = data = NULL;
+ data = NULL;
}
if (lret == ERROR_SUCCESS)
{
@@ -3464,12 +3464,16 @@ static void thumbnail_lnk(LPCWSTR lnkPath, LPCWSTR outputPath)
hr = open_icon(szIconPath, iconId, FALSE, &stream);
if (SUCCEEDED(hr))
hr = write_native_icon(stream, utf8OutputPath, NULL);
+ if (FAILED(hr))
+ WINE_ERR("writing icon failed, error 0x%08X\n", hr);
}
else
{
hr = open_icon(szPath, iconId, FALSE, &stream);
if (SUCCEEDED(hr))
hr = write_native_icon(stream, utf8OutputPath, NULL);
+ if (FAILED(hr))
+ WINE_ERR("writing icon failed, error 0x%08X\n", hr);
}
end:
More information about the wine-patches
mailing list