Commit d024b33c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/tests: Add some return value checks (Coverity).

parent c4ad7391
...@@ -1000,7 +1000,8 @@ static void test_set_clipboard(void) ...@@ -1000,7 +1000,8 @@ static void test_set_clipboard(void)
test_cf_dataobject(NULL); 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); OpenClipboard(NULL);
h = GetClipboardData(cf_onemore); h = GetClipboardData(cf_onemore);
...@@ -1180,7 +1181,8 @@ static void test_consumer_refs(void) ...@@ -1180,7 +1181,8 @@ static void test_consumer_refs(void)
ok(get1 != get2, "data objects match\n"); 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); hr = OleGetClipboard(&get3);
ok(hr == S_OK, "got %08x\n", hr); ok(hr == S_OK, "got %08x\n", hr);
...@@ -1260,7 +1262,8 @@ static void test_consumer_refs(void) ...@@ -1260,7 +1262,8 @@ static void test_consumer_refs(void)
refs = count_refs(src2); refs = count_refs(src2);
ok(refs == old_refs + 1, "%d %d\n", refs, old_refs); 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); refs = count_refs(src2);
ok(refs == 2, "%d\n", refs); ok(refs == 2, "%d\n", refs);
...@@ -1274,7 +1277,8 @@ static void test_consumer_refs(void) ...@@ -1274,7 +1277,8 @@ static void test_consumer_refs(void)
old_refs = count_refs(src); old_refs = count_refs(src);
ok(old_refs == 1, "%d\n", old_refs); 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); refs = count_refs(src);
ok(refs > old_refs, "%d %d\n", refs, old_refs); ok(refs > old_refs, "%d %d\n", refs, old_refs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment