Module: wine Branch: master Commit: 554644fd0db98e8eafe5ab41ad47839ff5fdbfd9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=554644fd0db98e8eafe5ab41ad...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Mon Jan 14 22:02:11 2008 +0000
ole32: Remove unneeded casts.
---
dlls/ole32/clipboard.c | 2 +- dlls/ole32/git.c | 4 ++-- dlls/ole32/ole16.c | 2 +- dlls/ole32/ole2.c | 4 ++-- dlls/ole32/stg_prop.c | 10 +++++----- dlls/ole32/storage32.c | 16 +++------------- 6 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 89ecfd5..4e43e38 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -1273,7 +1273,7 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_GetData( * Return the clipboard data in the storage medium structure */ pmedium->tymed = (hData == 0) ? TYMED_NULL : TYMED_HGLOBAL; - pmedium->u.hGlobal = (HGLOBAL)hData; + pmedium->u.hGlobal = hData; pmedium->pUnkForRelease = NULL;
hr = S_OK; diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c index e878f83..49dc3c8 100644 --- a/dlls/ole32/git.c +++ b/dlls/ole32/git.c @@ -104,7 +104,7 @@ StdGlobalInterfaceTable_FindEntry(IGlobalInterfaceTable* iface, DWORD cookie) StdGlobalInterfaceTableImpl* const self = (StdGlobalInterfaceTableImpl*) iface; StdGITEntry* e;
- TRACE("iface=%p, cookie=0x%x\n", iface, (UINT)cookie); + TRACE("iface=%p, cookie=0x%x\n", iface, cookie);
LIST_FOR_EACH_ENTRY(e, &self->list, StdGITEntry, entry) { if (e->cookie == cookie) @@ -227,7 +227,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal( StdGITEntry* entry; HRESULT hr;
- TRACE("iface=%p, dwCookie=0x%x\n", iface, (UINT)dwCookie); + TRACE("iface=%p, dwCookie=0x%x\n", iface, dwCookie);
EnterCriticalSection(&git_section);
diff --git a/dlls/ole32/ole16.c b/dlls/ole32/ole16.c index b89efa8..56a30f4 100644 --- a/dlls/ole32/ole16.c +++ b/dlls/ole32/ole16.c @@ -154,7 +154,7 @@ DWORD CDECL IMalloc16_fnGetSize(IMalloc16* iface,SEGPTR pv) * IMalloc16_DidAlloc [COMPOBJ.507] */ INT16 CDECL IMalloc16_fnDidAlloc(IMalloc16* iface,LPVOID pv) { - IMalloc16 *This = (IMalloc16 *)iface; + IMalloc16 *This = iface; TRACE("(%p)->DidAlloc(%p)\n",This,pv); return (INT16)-1; } diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index f6c0d18..91e35e2 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -1400,7 +1400,7 @@ static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lPar * If the window has an OLEMenu property we may need to dispatch * the menu message to its active objects window instead. */
- hOleMenu = (HOLEMENU)GetPropA( pMsg->hwnd, "PROP_OLEMenuDescriptor" ); + hOleMenu = GetPropA( pMsg->hwnd, "PROP_OLEMenuDescriptor" ); if ( !hOleMenu ) goto NEXTHOOK;
@@ -1505,7 +1505,7 @@ static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lPara * If the window has an OLEMenu property we may need to dispatch * the menu message to its active objects window instead. */
- hOleMenu = (HOLEMENU)GetPropA( pMsg->hwnd, "PROP_OLEMenuDescriptor" ); + hOleMenu = GetPropA( pMsg->hwnd, "PROP_OLEMenuDescriptor" ); if ( !hOleMenu ) goto NEXTHOOK;
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 76a86ca..6f4c690 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -200,7 +200,7 @@ static HRESULT WINAPI IPropertyStorage_fnQueryInterface( IsEqualGUID(&IID_IPropertyStorage, riid)) { IPropertyStorage_AddRef(iface); - *ppvObject = (IPropertyStorage*)iface; + *ppvObject = iface; return S_OK; }
@@ -263,7 +263,7 @@ static PROPVARIANT *PropertyStorage_FindPropertyByName( if (This->codePage == CP_UNICODE) { if (dictionary_find(This->name_to_propid, name, (void **)&propid)) - ret = PropertyStorage_FindProperty(This, (PROPID)propid); + ret = PropertyStorage_FindProperty(This, propid); } else { @@ -275,7 +275,7 @@ static PROPVARIANT *PropertyStorage_FindPropertyByName( { if (dictionary_find(This->name_to_propid, ansiName, (void **)&propid)) - ret = PropertyStorage_FindProperty(This, (PROPID)propid); + ret = PropertyStorage_FindProperty(This, propid); CoTaskMemFree(ansiName); } } @@ -528,7 +528,7 @@ static HRESULT PropertyStorage_StoreNameWithId(PropertyStorage_impl *This,
assert(srcName);
- hr = PropertyStorage_StringCopy((LPCSTR)srcName, cp, &name, This->codePage); + hr = PropertyStorage_StringCopy(srcName, cp, &name, This->codePage); if (SUCCEEDED(hr)) { if (This->codePage == CP_UNICODE) @@ -1059,7 +1059,7 @@ static HRESULT PropertyStorage_ReadProperty(PropertyStorage_impl *This, TRACE("Read char 0x%x ('%c')\n", prop->u.cVal, prop->u.cVal); break; case VT_UI1: - prop->u.bVal = *(const UCHAR *)data; + prop->u.bVal = *data; TRACE("Read byte 0x%x\n", prop->u.bVal); break; case VT_I2: diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 4bea165..a83c729 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1300,14 +1300,7 @@ static HRESULT WINAPI StorageImpl_CreateStorage( /* * Open it to get a pointer to return. */ - hr = IStorage_OpenStorage( - iface, - (const OLECHAR*)pwcsName, - 0, - grfMode, - 0, - 0, - ppstg); + hr = IStorage_OpenStorage(iface, pwcsName, 0, grfMode, 0, 0, ppstg);
if( (hr != S_OK) || (*ppstg == NULL)) { @@ -2004,9 +1997,7 @@ static HRESULT deleteStorageProperty( hr = IEnumSTATSTG_Next(elements, 1, ¤tElement, NULL); if (hr==S_OK) { - destroyHr = StorageImpl_DestroyElement( - (IStorage*)childStorage, - (OLECHAR*)currentElement.pwcsName); + destroyHr = StorageImpl_DestroyElement(childStorage, currentElement.pwcsName);
CoTaskMemFree(currentElement.pwcsName); } @@ -4053,8 +4044,7 @@ static ULONG IEnumSTATSTGImpl_FindProperty( currentProperty);
if ( propertyNameCmp( - (const OLECHAR*)currentProperty->name, - (const OLECHAR*)lpszPropName) == 0) + (const OLECHAR*)currentProperty->name, lpszPropName) == 0) return currentSearchNode;
/*