Michael Stefaniuc : ole32: Remove useless casts to self.
Alexandre Julliard
julliard at winehq.org
Fri Mar 1 16:42:09 CST 2019
Module: wine
Branch: master
Commit: 59fc5cfc3e47ec4c98ef6c674ae3384630eabd6d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=59fc5cfc3e47ec4c98ef6c674ae3384630eabd6d
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Thu Feb 28 21:39:48 2019 +0100
ole32: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole32/datacache.c | 2 +-
dlls/ole32/tests/compobj.c | 6 +++---
dlls/ole32/tests/marshal.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index 3eff569..6d4bcca 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -1003,7 +1003,7 @@ static HRESULT save_mfpict(DataCacheEntry *entry, BOOL contents, IStream *stream
meta_place_rec.bounding_box[3] = (LONGLONG)mfpict->yExt * meta_place_rec.inch / 2540;
GlobalUnlock(entry->stgmedium.u.hMetaFilePict);
- for (check = (WORD *)&meta_place_rec; check != (WORD *)&meta_place_rec.checksum; check++)
+ for (check = (WORD *)&meta_place_rec; check != &meta_place_rec.checksum; check++)
meta_place_rec.checksum ^= *check;
hr = IStream_Write(stream, &meta_place_rec, sizeof(struct meta_placeable), NULL);
if (hr == S_OK && data_size)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index b4dd83e..aebe967 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -1031,7 +1031,7 @@ static HRESULT WINAPI PSFactoryBuffer_CreateStub(
{
CHECK_EXPECT(CreateStub);
- ok(pUnkServer == (IUnknown*)&Test_Unknown, "unexpected pUnkServer %p\n", pUnkServer);
+ ok(pUnkServer == &Test_Unknown, "unexpected pUnkServer %p\n", pUnkServer);
if(!ps_factory_buffer)
return E_NOTIMPL;
@@ -3753,10 +3753,10 @@ static DWORD CALLBACK implicit_mta_proc(void *param)
hr = CoRegisterMessageFilter(NULL, NULL);
ok(hr == CO_E_NOT_SUPPORTED, "got %#x\n", hr);
- hr = CoLockObjectExternal((IUnknown *)&Test_Unknown, TRUE, TRUE);
+ hr = CoLockObjectExternal(&Test_Unknown, TRUE, TRUE);
ok_ole_success(hr, "CoLockObjectExternal");
- hr = CoDisconnectObject((IUnknown *)&Test_Unknown, 0);
+ hr = CoDisconnectObject(&Test_Unknown, 0);
ok_ole_success(hr, "CoDisconnectObject");
return 0;
diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index c53acf2..33b155d 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -329,7 +329,7 @@ static HRESULT WINAPI Test_IClassFactory_CreateInstance(
LPVOID *ppvObj)
{
if (pUnkOuter) return CLASS_E_NOAGGREGATION;
- return IUnknown_QueryInterface((IUnknown*)&Test_Unknown, riid, ppvObj);
+ return IUnknown_QueryInterface(&Test_Unknown, riid, ppvObj);
}
static HRESULT WINAPI Test_IClassFactory_LockServer(
More information about the wine-cvs
mailing list