oleaut32/tests: Avoid casts from COM object to interface.

Michael Stefaniuc mstefani at redhat.de
Tue Sep 13 03:27:18 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/oleaut32/tests/vartest.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 00b2919..0e86ffb 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -723,12 +723,13 @@ static void test_VariantClear(void)
 
   /* DISPATCH */
   V_VT(&v) = VT_DISPATCH;
-  V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl;
+  V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl.IUnknown_iface;
   test_myVariantClearImpl.events = 0;
   hres = VariantClear(&v);
   ok(hres == S_OK, "ret %08x\n", hres);
   ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v));
-  ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl, "dispatch %p\n", V_DISPATCH(&v));
+  ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl.IUnknown_iface,
+     "dispatch %p\n", V_DISPATCH(&v));
   /* Check that Release got called, but nothing else */
   ok(test_myVariantClearImpl.events ==  0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events);
 
-- 
2.7.4



More information about the wine-patches mailing list