Alex Henrie : shlwapi/tests: Add missing return value checks to istream tests (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Jan 8 16:08:06 CST 2018


Module: wine
Branch: master
Commit: 031f2ab64f9700e2e4490b6f7aaf3762f9606f95
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=031f2ab64f9700e2e4490b6f7aaf3762f9606f95

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Mon Jan  8 01:19:29 2018 -0700

shlwapi/tests: Add missing return value checks to istream tests (Coverity).

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shlwapi/tests/istream.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c
index 54a73fc..926f2f8 100644
--- a/dlls/shlwapi/tests/istream.c
+++ b/dlls/shlwapi/tests/istream.c
@@ -663,8 +663,10 @@ static void test_SHCreateStreamOnFileEx_CopyTo(void)
     static const WCHAR prefix[] = { 'T', 'S', 'T', 0 };
 
     GetTempPathW(MAX_PATH, tmpPath);
-    GetTempFileNameW(tmpPath, prefix, 0, srcFileName);
-    GetTempFileNameW(tmpPath, prefix, 0, dstFileName);
+    ret = GetTempFileNameW(tmpPath, prefix, 0, srcFileName);
+    ok(ret != 0, "GetTempFileName failed, got error %d\n", GetLastError());
+    ret = GetTempFileNameW(tmpPath, prefix, 0, dstFileName);
+    ok(ret != 0, "GetTempFileName failed, got error %d\n", GetLastError());
 
     ret = SHCreateStreamOnFileEx(srcFileName, STGM_CREATE | STGM_READWRITE | STGM_DELETEONRELEASE, FILE_ATTRIBUTE_TEMPORARY, FALSE, NULL, &src);
     ok(SUCCEEDED(ret), "SHCreateStreamOnFileEx failed with ret=0x%08x\n", ret);




More information about the wine-cvs mailing list