[PATCH] ole32/tests: Add some return value checks (Coverity).
Nikolay Sivov
nsivov at codeweavers.com
Fri Jan 3 13:43:42 CST 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/ole32/tests/clipboard.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index b97c2646bf..0a087aff84 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -1000,7 +1000,8 @@ static void test_set_clipboard(void)
test_cf_dataobject(NULL);
- ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard, hr = 0x%08x\n", hr);
+ hr = OleSetClipboard(NULL);
+ ok(hr == S_OK, "Failed to clear clipboard, hr = 0x%08x\n", hr);
OpenClipboard(NULL);
h = GetClipboardData(cf_onemore);
@@ -1180,7 +1181,8 @@ static void test_consumer_refs(void)
ok(get1 != get2, "data objects match\n");
- OleSetClipboard(NULL);
+ hr = OleSetClipboard(NULL);
+ ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr);
hr = OleGetClipboard(&get3);
ok(hr == S_OK, "got %08x\n", hr);
@@ -1260,7 +1262,8 @@ static void test_consumer_refs(void)
refs = count_refs(src2);
ok(refs == old_refs + 1, "%d %d\n", refs, old_refs);
- OleSetClipboard(NULL);
+ hr = OleSetClipboard(NULL);
+ ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr);
refs = count_refs(src2);
ok(refs == 2, "%d\n", refs);
@@ -1274,7 +1277,8 @@ static void test_consumer_refs(void)
old_refs = count_refs(src);
ok(old_refs == 1, "%d\n", old_refs);
- OleSetClipboard(src);
+ hr = OleSetClipboard(src);
+ ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr);
refs = count_refs(src);
ok(refs > old_refs, "%d %d\n", refs, old_refs);
--
2.24.1
More information about the wine-devel
mailing list