Module: wine Branch: master Commit: 330e6d86f9da8c6f08a0a8402116837104919ba5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=330e6d86f9da8c6f08a0a84021...
Author: Michael Stefaniuc mstefani@redhat.de Date: Thu Jan 29 11:14:36 2009 +0100
oleaut32/tests: Remove superfluous pointer casts.
---
dlls/oleaut32/tests/olepicture.c | 4 ++-- dlls/oleaut32/tests/safearray.c | 6 +++--- dlls/oleaut32/tests/tmarshal.c | 2 +- dlls/oleaut32/tests/usrmarshal.c | 4 ++-- dlls/oleaut32/tests/vartype.c | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index ee13227..f2997d6 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -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) diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 4fc615e..a34f095 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -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); diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 713c366..adc5d9f 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -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;
diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index dcf1150..9b12b2e 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -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; diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 6e3136d..4f28234 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -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)