Commit 330e6d86 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

oleaut32/tests: Remove superfluous pointer casts.

parent 620e81a9
......@@ -760,11 +760,11 @@ static HRESULT WINAPI NoStatStreamImpl_QueryInterface(
*ppvObject = 0;
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
{
*ppvObject = (IStream*)This;
*ppvObject = This;
}
else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0)
{
*ppvObject = (IStream*)This;
*ppvObject = This;
}
if ((*ppvObject)==0)
......
......@@ -1274,7 +1274,7 @@ static void test_SafeArrayCopyData(void)
/* Fill the source array with some data; it doesn't matter what */
for (dimension = 0; dimension < size; dimension++)
{
int* data = (int*)sa->pvData;
int* data = sa->pvData;
data[dimension] = dimension;
}
......@@ -1420,7 +1420,7 @@ static void test_SafeArrayCreateEx(void)
/* Win32 doesn't care if GetSize fails */
fail_GetSize = TRUE;
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, (LPVOID)iRec);
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, iRec);
ok(sa != NULL, "CreateEx (Fail Size) failed\n");
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref);
ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled);
......@@ -1437,7 +1437,7 @@ static void test_SafeArrayCreateEx(void)
iRec->ref = START_REF_COUNT;
iRec->sizeCalled = 0;
iRec->clearCalled = 0;
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, (LPVOID)iRec);
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, iRec);
ok(sa != NULL, "CreateEx (Rec) failed\n");
ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref);
ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled);
......
......@@ -135,7 +135,7 @@ struct host_object_data
static DWORD CALLBACK host_object_proc(LPVOID p)
{
struct host_object_data *data = (struct host_object_data *)p;
struct host_object_data *data = p;
HRESULT hr;
MSG msg;
......
......@@ -154,7 +154,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
{
GUID guid;
SafeArrayGetIID(lpsa, &guid);
ok(IsEqualGUID(&guid, (GUID*)wiresa), "guid mismatch\n");
ok(IsEqualGUID(&guid, wiresa), "guid mismatch\n");
wiresa += sizeof(GUID);
}
ok(!memcmp(wiresa, lpsa->rgsabound, sizeof(lpsa->rgsabound[0]) * lpsa->cDims), "bounds mismatch\n");
......@@ -444,7 +444,7 @@ static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, v
if (IsEqualIID(riid, &IID_IUnknown))
{
IUnknown_AddRef(iface);
*ppv = (LPVOID)iface;
*ppv = iface;
return S_OK;
}
*ppv = NULL;
......
......@@ -554,7 +554,7 @@ static HRESULT WINAPI DummyDispatch_QueryInterface(LPDISPATCH iface,
}
if (*ppvObject)
{
DummyDispatch_AddRef((IDispatch*)*ppvObject);
DummyDispatch_AddRef(*ppvObject);
return S_OK;
}
}
......@@ -5452,12 +5452,12 @@ static void test_IUnknownChangeTypeEx(void)
/* =>IDispatch */
u.ref = 1;
V_VT(&vSrc) = VT_UNKNOWN;
V_UNKNOWN(&vSrc) = (IUnknown*)pu;
V_UNKNOWN(&vSrc) = pu;
VariantInit(&vDst);
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN);
/* Note vSrc is not cleared, as final refcount is 2 */
ok(hres == S_OK && u.ref == 2 &&
V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == (IUnknown*)pu,
V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == pu,
"change unk(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n",
S_OK, 2, VT_UNKNOWN, pu, hres, u.ref, V_VT(&vDst), V_UNKNOWN(&vDst));
......@@ -5467,7 +5467,7 @@ static void test_IUnknownChangeTypeEx(void)
HRESULT hExpected = DISP_E_BADVARTYPE;
V_VT(&vSrc) = VT_UNKNOWN;
V_UNKNOWN(&vSrc) = (IUnknown*)pu;
V_UNKNOWN(&vSrc) = pu;
VariantInit(&vDst);
if (vt == VT_UNKNOWN || vt == VT_DISPATCH || vt == VT_EMPTY || vt == VT_NULL)
......
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