From 2f2575567465863f005e0dcfb5d073cc49c6ad68 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sat, 19 Jan 2008 16:54:28 +0000 Subject: [PATCH] shell32: Remove unneeded casts. --- dlls/shell32/recyclebin.c | 12 ++++++------ dlls/shell32/shell.c | 2 +- dlls/shell32/shell32_main.c | 6 +++--- dlls/shell32/shelllink.c | 4 ++-- dlls/shell32/shfldr_fs.c | 2 +- dlls/shell32/shfldr_mycomp.c | 2 +- dlls/shell32/shfldr_unixfs.c | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index ddf2fc35e8b..6c26e3d0749 100644 --- a/dlls/shell32/recyclebin.c +++ b/dlls/shell32/recyclebin.c @@ -206,9 +206,9 @@ static HRESULT WINAPI RecycleBin_EnumObjects(IShellFolder2 *iface, HWND hwnd, SH HRESULT ret; int pidls_count; int i=0; - - TRACE("(%p, %p, %x, %p)\n", This, hwnd, (unsigned int)grfFlags, ppenumIDList); - + + TRACE("(%p, %p, %x, %p)\n", This, hwnd, grfFlags, ppenumIDList); + if (grfFlags & SHCONTF_NONFOLDERS) { *ppenumIDList = NULL; @@ -293,7 +293,7 @@ static HRESULT WINAPI RecycleBin_CreateViewObject(IShellFolder2 *iface, HWND hwn static HRESULT WINAPI RecycleBin_GetAttributesOf(IShellFolder2 *This, UINT cidl, LPCITEMIDLIST *apidl, SFGAOF *rgfInOut) { - TRACE("(%p, %d, {%p, ...}, {%x})\n", This, cidl, apidl[0], (unsigned int)*rgfInOut); + TRACE("(%p, %d, {%p, ...}, {%x})\n", This, cidl, apidl[0], *rgfInOut); *rgfInOut &= SFGAO_CANMOVE|SFGAO_CANDELETE|SFGAO_HASPROPSHEET|SFGAO_FILESYSTEM; return S_OK; } @@ -310,7 +310,7 @@ static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, LPCITEMID { WIN32_FIND_DATAW data; - TRACE("(%p, %p, %x, %p)\n", This, pidl, (unsigned int)uFlags, pName); + TRACE("(%p, %p, %x, %p)\n", This, pidl, uFlags, pName); TRASH_UnpackItemID(&pidl->mkid, NULL, &data); pName->uType = STRRET_WSTR; pName->u.pOleStr = StrDupW(PathFindFileNameW(data.cFileName)); @@ -371,7 +371,7 @@ static HRESULT WINAPI RecycleBin_EnumSearches(IShellFolder2 *iface, IEnumExtraSe static HRESULT WINAPI RecycleBin_GetDefaultColumn(IShellFolder2 *iface, DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) { RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %x, %p, %p)\n", This, (unsigned int)dwReserved, pSort, pDisplay); + TRACE("(%p, %x, %p, %p)\n", This, dwReserved, pSort, pDisplay); *pSort = 0; *pDisplay = 0; return S_OK; diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c index 0078f572585..981e28c8d24 100644 --- a/dlls/shell32/shell.c +++ b/dlls/shell32/shell.c @@ -133,7 +133,7 @@ end: void WINAPI DragFinish16(HDROP16 h) { TRACE("\n"); - GlobalFree16((HGLOBAL16)h); + GlobalFree16(h); } diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 0b7a8f325bb..37694ba6c4e 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -526,7 +526,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, static const WCHAR p1W[] = {'%','1',0}; WCHAR sTemp [MAX_PATH]; - szExt = (LPWSTR) PathFindExtensionW(szFullPath); + szExt = PathFindExtensionW(szFullPath); TRACE("szExt=%s\n", debugstr_w(szExt)); if ( szExt && HCR_MapTypeToValueW(szExt, sTemp, MAX_PATH, TRUE) && @@ -584,7 +584,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, static const WCHAR p1W[] = {'%','1',0}; psfi->iIcon = 0; - szExt = (LPWSTR) PathFindExtensionW(sTemp); + szExt = PathFindExtensionW(sTemp); if ( szExt && HCR_MapTypeToValueW(szExt, sTemp, MAX_PATH, TRUE) && HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &icon_idx)) @@ -1090,7 +1090,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, if(!(hRes = FindResourceW(shell32_hInstance, wszSHELL_ABOUT_MSGBOX, (LPWSTR)RT_DIALOG))) return FALSE; - if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) + if(!(template = LoadResource(shell32_hInstance, hRes))) return FALSE; info.szApp = szApp; info.szOtherStuff = szOtherStuff; diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index c42242cc2ac..6e9ac708cc0 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -1539,7 +1539,7 @@ static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPCITEMIDLIST pidl, if (SUCCEEDED(hr)) { IExtractIconA* pei; - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); + hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); if (SUCCEEDED(hr)) { hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); @@ -1918,7 +1918,7 @@ static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPCITEMIDLIST pidl, if (SUCCEEDED(hr)) { IExtractIconW* pei; - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); + hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); if (SUCCEEDED(hr)) { hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index 2b0e407c795..830013bba09 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -588,7 +588,7 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, IShellFolder *psfParent = NULL; LPCITEMIDLIST rpidl = NULL; - hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); + hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, &rpidl); if(SUCCEEDED(hr)) { SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); IShellFolder_Release(psfParent); diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index 87530a58163..af9958e82e4 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -447,7 +447,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, IShellFolder *psfParent = NULL; LPCITEMIDLIST rpidl = NULL; - hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); + hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, &rpidl); if(SUCCEEDED(hr)) { SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); IShellFolder_Release(psfParent); diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 6ec8d11d863..ab1f78a6aa6 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -947,11 +947,11 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_BindToObject(IShellFolder2* iface } else { clsidChild = This->m_pCLSID; } - + hr = CreateUnixFolder(NULL, &IID_IPersistFolder3, (void**)&persistFolder, clsidChild); if (!SUCCEEDED(hr)) return hr; - hr = IPersistFolder_QueryInterface(persistFolder, riid, (void**)ppvOut); - + hr = IPersistFolder_QueryInterface(persistFolder, riid, ppvOut); + if (SUCCEEDED(hr)) { UnixFolder *subfolder = ADJUST_THIS(UnixFolder, IPersistFolder3, persistFolder); subfolder->m_pidlLocation = ILCombine(This->m_pidlLocation, pidl);