shell32/tests: Actually test some return values (PVS-Studio)

Michael Stefaniuc mstefani at redhat.de
Wed Mar 4 02:50:59 CST 2015


---
 dlls/shell32/tests/shellpath.c | 1 +
 dlls/shell32/tests/systray.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c
index e2277ec..af88c6b 100644
--- a/dlls/shell32/tests/shellpath.c
+++ b/dlls/shell32/tests/shellpath.c
@@ -2107,6 +2107,7 @@ static void test_knownFolders(void)
             ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
 
             hr = IKnownFolder_GetPath(folder, 0, &folderPath);
+            ok(hr == S_OK, "failed to get path from known folder: 0x%08x\n", hr);
             ok(lstrcmpiW(sWinDir, folderPath)==0, "invalid path returned: \"%s\", expected: \"%s\"\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sWinDir));
             CoTaskMemFree(folderPath);
 
diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c
index cb27866..0d815a6 100644
--- a/dlls/shell32/tests/systray.c
+++ b/dlls/shell32/tests/systray.c
@@ -45,6 +45,7 @@ static void test_cbsize(void)
         nidW.hIcon = LoadIconA(NULL, (LPSTR)IDI_APPLICATION);
         nidW.uCallbackMessage = WM_USER+17;
         ret = pShell_NotifyIconW(NIM_ADD, &nidW);
+        ok(ret, "NIM_ADD failed!\n");
         /* using an invalid cbSize does work */
         nidW.cbSize = 3;
         nidW.hWnd = hMainWnd;
-- 
1.9.3



More information about the wine-patches mailing list