shell32: Remove superfluous pointer casts.
diff --git a/dlls/shell32/appbar.c b/dlls/shell32/appbar.c
index 5f9c25f..7f89a37 100644
--- a/dlls/shell32/appbar.c
+++ b/dlls/shell32/appbar.c
@@ -109,7 +109,7 @@
return 0;
}
- response = (struct appbar_response*)return_view;
+ response = return_view;
ret = response->result;
*data = response->abd;
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 7646dee..cd087d2 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -167,7 +167,7 @@
IsEqualIID(riid, &IID_IAutoComplete) ||
IsEqualIID(riid, &IID_IAutoComplete2))
{
- *ppvObj = (IAutoComplete2*)This;
+ *ppvObj = This;
}
else if (IsEqualIID(riid, &IID_IAutoCompleteDropDown))
{
@@ -483,9 +483,8 @@
}
return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
case WM_KEYUP:
-
- GetWindowTextW( hwnd, (LPWSTR)hwndText, 255);
-
+ GetWindowTextW( hwnd, hwndText, 255);
+
switch(wParam) {
case VK_RETURN:
/* If quickComplete is set and control is pressed, replace the string */
diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index d62bd10..cc8a91d 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -686,7 +686,7 @@
static BOOL BrsFolder_OnSetExpanded(browse_info *info, LPVOID selection,
BOOL is_str, HTREEITEM *pItem)
{
- LPITEMIDLIST pidlSelection = (LPITEMIDLIST)selection;
+ LPITEMIDLIST pidlSelection = selection;
LPCITEMIDLIST pidlCurrent, pidlRoot;
TVITEMEXW item;
BOOL bResult = FALSE;
@@ -701,7 +701,7 @@
goto done;
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL,
- (LPOLESTR)selection, NULL, &pidlSelection, NULL);
+ selection, NULL, &pidlSelection, NULL);
IShellFolder_Release(psfDesktop);
if (FAILED(hr))
goto done;
@@ -751,7 +751,7 @@
bResult = TRUE;
done:
- if (pidlSelection && pidlSelection != (LPITEMIDLIST)selection)
+ if (pidlSelection && pidlSelection != selection)
ILFree(pidlSelection);
if (pItem)
@@ -777,10 +777,10 @@
if (!is_str)
return BrsFolder_OnSetSelectionW(info, selection, is_str);
-
- if ((length = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, NULL, 0)) &&
+
+ if ((length = MultiByteToWideChar(CP_ACP, 0, selection, -1, NULL, 0)) &&
(selectionW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR))) &&
- MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, selectionW, length))
+ MultiByteToWideChar(CP_ACP, 0, selection, -1, selectionW, length))
{
result = BrsFolder_OnSetSelectionW(info, selectionW, is_str);
}
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c
index 6c1882b..96345b6 100644
--- a/dlls/shell32/changenotify.c
+++ b/dlls/shell32/changenotify.c
@@ -135,7 +135,7 @@
{
LPNOTIFICATIONLIST ptr;
for( ptr = head; ptr; ptr = ptr->next )
- if( ptr == (LPNOTIFICATIONLIST) hitem )
+ if( ptr == hitem )
return ptr;
return NULL;
}
@@ -315,16 +315,16 @@
switch (typeFlag)
{
case SHCNF_PATHA:
- if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1);
- if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2);
+ if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA(dwItem1);
+ if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA(dwItem2);
break;
case SHCNF_PATHW:
- if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1);
- if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2);
+ if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW(dwItem1);
+ if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW(dwItem2);
break;
case SHCNF_IDLIST:
- Pidls[0] = (LPCITEMIDLIST)dwItem1;
- Pidls[1] = (LPCITEMIDLIST)dwItem2;
+ Pidls[0] = dwItem1;
+ Pidls[1] = dwItem2;
break;
case SHCNF_PRINTERA:
case SHCNF_PRINTERW:
@@ -458,7 +458,7 @@
/* LeaveCriticalSection(&SHELL32_ChangenotifyCS); */
- return (HANDLE) node;
+ return node;
}
/*************************************************************************
diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c
index fc012a9..5d2e2de 100644
--- a/dlls/shell32/control.c
+++ b/dlls/shell32/control.c
@@ -244,9 +244,9 @@
static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs)
{
- CPanel* panel = (CPanel*)cs->lpCreateParams;
+ CPanel* panel = cs->lpCreateParams;
HMENU hMenu, hSubMenu;
- CPlApplet* applet;
+ CPlApplet* applet;
MENUITEMINFOW mii;
unsigned int i;
int menucount, index;
@@ -292,7 +292,7 @@
if (!item)
continue;
- item->applet = (CPlApplet *) applet;
+ item->applet = applet;
item->id = i;
mii.cbSize = sizeof(MENUITEMINFOW);
diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c
index 2e4e683..af3e0ca 100644
--- a/dlls/shell32/cpanelfolder.c
+++ b/dlls/shell32/cpanelfolder.c
@@ -205,7 +205,7 @@
if (!refCount) {
TRACE("-- destroying IShellFolder(%p)\n", This);
SHFree(This->pidlRoot);
- LocalFree((HLOCAL) This);
+ LocalFree(This);
}
return refCount;
}
diff --git a/dlls/shell32/dataobject.c b/dlls/shell32/dataobject.c
index 1c58260..f949fe0 100644
--- a/dlls/shell32/dataobject.c
+++ b/dlls/shell32/dataobject.c
@@ -64,7 +64,7 @@
}
else if(IsEqualIID(riid, &IID_IEnumFORMATETC))
{
- *ppvObj = (IEnumFORMATETC*)This;
+ *ppvObj = This;
}
if(*ppvObj)
@@ -232,7 +232,7 @@
}
else if(IsEqualIID(riid, &IID_IDataObject)) /*IDataObject*/
{
- *ppvObj = (IDataObject*)This;
+ *ppvObj = This;
}
if(*ppvObj)
diff --git a/dlls/shell32/debughlp.c b/dlls/shell32/debughlp.c
index 3223839..903ddcf 100644
--- a/dlls/shell32/debughlp.c
+++ b/dlls/shell32/debughlp.c
@@ -82,21 +82,21 @@
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
- return (LPSTR)pdata->u.drive.szDriveName;
+ return pdata->u.drive.szDriveName;
case PT_FOLDER:
case PT_FOLDER1:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
- return (LPSTR)pdata->u.file.szNames;
+ return pdata->u.file.szNames;
case PT_WORKGRP:
case PT_COMP:
case PT_NETWORK:
case PT_NETPROVIDER:
case PT_SHARE:
- return (LPSTR)pdata->u.network.szNames;
+ return pdata->u.network.szNames;
}
}
return NULL;
@@ -160,10 +160,10 @@
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
- return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1);
+ return pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1;
case PT_WORKGRP:
- return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1);
+ return pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1;
}
}
return NULL;
diff --git a/dlls/shell32/dragdrophelper.c b/dlls/shell32/dragdrophelper.c
index 5015722..2e12cd9 100644
--- a/dlls/shell32/dragdrophelper.c
+++ b/dlls/shell32/dragdrophelper.c
@@ -128,8 +128,8 @@
TRACE ("(%p)->(count=%u)\n", This, refCount + 1);
if (!refCount) {
- TRACE("-- destroying (%p)\n", This);
- LocalFree ((HLOCAL) This);
+ TRACE ("-- destroying (%p)\n", This);
+ LocalFree (This);
return 0;
}
return refCount;
diff --git a/dlls/shell32/enumidlist.c b/dlls/shell32/enumidlist.c
index 9665ccd..c3d363c 100644
--- a/dlls/shell32/enumidlist.c
+++ b/dlls/shell32/enumidlist.c
@@ -224,7 +224,7 @@
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/
- { *ppvObj = (IEnumIDList*)This;
+ { *ppvObj = This;
}
if(*ppvObj)
diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c
index 8766c50..379ffde 100644
--- a/dlls/shell32/folders.c
+++ b/dlls/shell32/folders.c
@@ -108,15 +108,15 @@
}
else if (IsEqualIID(riid, &IID_IPersistFile)) /*IExtractIcon*/
{
- *ppvObj = (IPersistFile*)&(This->lpvtblPersistFile);
+ *ppvObj = &This->lpvtblPersistFile;
}
else if (IsEqualIID(riid, &IID_IExtractIconA)) /*IExtractIcon*/
{
- *ppvObj = (IExtractIconA*)&(This->lpvtblExtractIconA);
+ *ppvObj = &This->lpvtblExtractIconA;
}
else if (IsEqualIID(riid, &IID_IExtractIconW)) /*IExtractIcon*/
{
- *ppvObj = (IExtractIconW*)This;
+ *ppvObj = This;
}
if(*ppvObj)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index efd25a1..6ef5d8e 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -77,8 +77,9 @@
* Callback for DPA_Search
*/
static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam)
-{ LPSIC_ENTRY e1 = (LPSIC_ENTRY)p1, e2 = (LPSIC_ENTRY)p2;
-
+{
+ LPSIC_ENTRY e1 = p1, e2 = p2;
+
TRACE("%p %p %8lx\n", p1, p2, lparam);
/* Icons in the cache are keyed by the name of the file they are
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 01479fb..c259d24 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -299,7 +299,7 @@
IStream_AddRef (pStream);
- if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead)))
+ if (SUCCEEDED(IStream_Read(pStream, &wLen, 2, &dwBytesRead)))
{
TRACE("PIDL length is %d\n", wLen);
if (wLen != 0)
@@ -354,7 +354,7 @@
wLen = ILGetSize(pPidl);
- if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL)))
+ if (SUCCEEDED(IStream_Write(pStream, &wLen, 2, NULL)))
{
if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL)))
ret = S_OK;
@@ -1977,21 +1977,21 @@
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
- return (LPSTR)pdata->u.drive.szDriveName;
+ return pdata->u.drive.szDriveName;
case PT_FOLDER:
case PT_FOLDER1:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
- return (LPSTR)pdata->u.file.szNames;
+ return pdata->u.file.szNames;
case PT_WORKGRP:
case PT_COMP:
case PT_NETWORK:
case PT_NETPROVIDER:
case PT_SHARE:
- return (LPSTR)pdata->u.network.szNames;
+ return pdata->u.network.szNames;
}
return NULL;
}
@@ -2015,10 +2015,10 @@
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
- return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1);
+ return pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1;
case PT_WORKGRP:
- return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1);
+ return pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1;
}
return NULL;
}
diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index 3329fc8..05978f3 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -311,7 +311,7 @@
if (This->pPidl)
ILFree(This->pPidl);
- LocalFree((HANDLE)This);
+ LocalFree(This);
return 0;
}
@@ -585,20 +585,20 @@
/* convert to unicode if necessary */
if( !unicode )
{
- count = MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, NULL, 0 );
+ count = MultiByteToWideChar( CP_ACP, 0, temp, len, NULL, 0 );
str = HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) );
if( !str )
{
HeapFree( GetProcessHeap(), 0, temp );
return E_OUTOFMEMORY;
}
- MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count );
+ MultiByteToWideChar( CP_ACP, 0, temp, len, str, count );
HeapFree( GetProcessHeap(), 0, temp );
}
else
{
count /= 2;
- str = (LPWSTR) temp;
+ str = temp;
}
str[count] = 0;
@@ -637,7 +637,7 @@
TRACE("Read %d bytes\n",chunk->size);
- *data = (LPVOID) chunk;
+ *data = chunk;
return S_OK;
}
@@ -1308,7 +1308,7 @@
hr = E_FAIL;
if (SUCCEEDED(hr))
- *ppv = (IUnknown*) psl;
+ *ppv = psl;
IPersistFile_Release(ppf);
}
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index e67556f..69229f3 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -518,7 +518,7 @@
void WINAPI DragFinish(HDROP h)
{
TRACE("\n");
- GlobalFree((HGLOBAL)h);
+ GlobalFree(h);
}
/*************************************************************************
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 82a0e69..eaf2859 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -382,7 +382,7 @@
__ms_va_end(args);
ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType);
- LocalFree((HLOCAL)pszTemp);
+ LocalFree(pszTemp);
return ret;
}
@@ -440,7 +440,7 @@
__ms_va_end(args);
ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType);
- LocalFree((HLOCAL)pszTemp);
+ LocalFree(pszTemp);
return ret;
}
@@ -663,7 +663,7 @@
/* Add the new entry into the MRU list
*/
- return AddMRUData(mruhandle, (LPCVOID)buffer, *len);
+ return AddMRUData(mruhandle, buffer, *len);
}
/*************************************************************************
@@ -814,15 +814,15 @@
switch (uFlags)
{
case SHARD_PIDL:
- SHGetPathFromIDListA((LPCITEMIDLIST) pv, doc_name);
+ SHGetPathFromIDListA(pv, doc_name);
break;
case SHARD_PATHA:
- lstrcpynA(doc_name, (LPCSTR)pv, MAX_PATH);
+ lstrcpynA(doc_name, pv, MAX_PATH);
break;
case SHARD_PATHW:
- WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)pv, -1, doc_name, MAX_PATH, NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, pv, -1, doc_name, MAX_PATH, NULL, NULL);
break;
default:
@@ -970,9 +970,9 @@
/* Set the document path or pidl */
if (uFlags == SHARD_PIDL) {
- hres = IShellLinkA_SetIDList(psl, (LPCITEMIDLIST) pv);
+ hres = IShellLinkA_SetIDList(psl, pv);
} else {
- hres = IShellLinkA_SetPath(psl, (LPCSTR) pv);
+ hres = IShellLinkA_SetPath(psl, pv);
}
if(FAILED(hres)) {
/* bombed */
@@ -1771,7 +1771,7 @@
psxa->pspsx[i]->lpVtbl->Release(psxa->pspsx[i]);
}
- LocalFree((HLOCAL)psxa);
+ LocalFree(psxa);
}
}
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
index 25acf40..77a98f3 100644
--- a/dlls/shell32/shfldr_fs.c
+++ b/dlls/shell32/shfldr_fs.c
@@ -196,7 +196,7 @@
SHFree (This->pidlRoot);
SHFree (This->sPathTarget);
- LocalFree ((HLOCAL) This);
+ LocalFree (This);
}
return refCount;
}
@@ -324,7 +324,7 @@
return NULL;
/* see if the caller bound File System Bind Data */
- r = IBindCtx_GetObjectParam( pbc, (LPOLESTR) szfsbc, ¶m );
+ r = IBindCtx_GetObjectParam( pbc, szfsbc, ¶m );
if (FAILED(r))
return NULL;
diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c
index 17f61c9..f49ea81 100644
--- a/dlls/shell32/shfldr_mycomp.c
+++ b/dlls/shell32/shfldr_mycomp.c
@@ -187,7 +187,7 @@
{
TRACE ("-- destroying IShellFolder(%p)\n", This);
SHFree (This->pidlRoot);
- LocalFree ((HLOCAL) This);
+ LocalFree (This);
}
return refCount;
}
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index a560397..f50e284 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -499,7 +499,7 @@
((LPSHITEMID)pIDL)->cb = cbLen;
/* Set shell32's standard SHITEMID data fields. */
- pIDLData = _ILGetDataPointer((LPCITEMIDLIST)pIDL);
+ pIDLData = _ILGetDataPointer(pIDL);
pIDLData->type = S_ISDIR(fileStat.st_mode) ? PT_FOLDER : PT_VALUE;
pIDLData->u.file.dwFileSize = (DWORD)fileStat.st_size;
UNIXFS_seconds_since_1970_to_dos_date_time(fileStat.st_mtime, &pIDLData->u.file.uFileDate,
@@ -1093,14 +1093,14 @@
LPITEMIDLIST pidl;
if (cidl != 1) return E_INVALIDARG;
pidl = ILCombine(This->m_pidlLocation, apidl[0]);
- *ppvOut = (LPVOID)IExtractIconA_Constructor(pidl);
+ *ppvOut = IExtractIconA_Constructor(pidl);
SHFree(pidl);
return S_OK;
} else if (IsEqualIID(&IID_IExtractIconW, riid)) {
LPITEMIDLIST pidl;
if (cidl != 1) return E_INVALIDARG;
pidl = ILCombine(This->m_pidlLocation, apidl[0]);
- *ppvOut = (LPVOID)IExtractIconW_Constructor(pidl);
+ *ppvOut = IExtractIconW_Constructor(pidl);
SHFree(pidl);
return S_OK;
} else if (IsEqualIID(&IID_IDropTarget, riid)) {
@@ -2287,7 +2287,7 @@
* and see if it passes the filter.
*/
lstrcpyA(pszRelativePath, pDirEntry->d_name);
- rgelt[i] = (LPITEMIDLIST)SHAlloc(
+ rgelt[i] = SHAlloc(
UNIXFS_shitemid_len_from_filename(pszRelativePath, NULL, NULL)+sizeof(USHORT));
if (!UNIXFS_build_shitemid(This->m_szFolder, rgelt[i]) ||
!UNIXFS_is_pidl_of_type(rgelt[i], This->m_fFilter))
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index ec7ba54..b48e46d 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -126,7 +126,7 @@
/* this will remap the rect to dialog coords */
MapWindowPoints(GetDlgItem(hDlg, IDD_MESSAGE), hDlg, (LPPOINT)&r, 2);
hOldFont = SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDD_MESSAGE, WM_GETFONT, 0, 0));
- DrawTextW(hdc, (LPWSTR)GetPropW(hDlg, CONFIRM_MSG_PROP), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK);
+ DrawTextW(hdc, GetPropW(hDlg, CONFIRM_MSG_PROP), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK);
SelectObject(hdc, hOldFont);
EndPaint(hDlg, &ps);
return TRUE;
@@ -143,7 +143,7 @@
SetWindowTextW(hDlg, info->lpszCaption);
ShowWindow(GetDlgItem(hDlg, IDD_MESSAGE), SW_HIDE);
- SetPropW(hDlg, CONFIRM_MSG_PROP, (HANDLE)info->lpszText);
+ SetPropW(hDlg, CONFIRM_MSG_PROP, info->lpszText);
SendDlgItemMessageW(hDlg, IDD_ICON, STM_SETICON, (WPARAM)info->hIcon, 0);
/* compute the text height and resize the dialog */
@@ -1569,12 +1569,12 @@
for (; i>= 0; i--)
{
- LPSHNAMEMAPPINGW lp = DSA_GetItemPtr((HDSA)hNameMapping, i);
+ LPSHNAMEMAPPINGW lp = DSA_GetItemPtr(hNameMapping, i);
SHFree(lp->pszOldPath);
SHFree(lp->pszNewPath);
}
- DSA_Destroy((HDSA)hNameMapping);
+ DSA_Destroy(hNameMapping);
}
}
diff --git a/dlls/shell32/shlfsbind.c b/dlls/shell32/shlfsbind.c
index 8dbfc45..d773ef9 100644
--- a/dlls/shell32/shlfsbind.c
+++ b/dlls/shell32/shlfsbind.c
@@ -114,7 +114,7 @@
if (IsEqualIID(riid, &IID_IUnknown))
*ppV = This;
else if (IsEqualIID(riid, &IID_IFileSystemBindData))
- *ppV = (IFileSystemBindData*)This;
+ *ppV = This;
if (*ppV)
{
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 77ba2ec..c5783dc 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -455,8 +455,8 @@
FILETIME fd1, fd2;
char strName1[MAX_PATH], strName2[MAX_PATH];
BOOL bIsFolder1, bIsFolder2,bIsBothFolder;
- LPITEMIDLIST pItemIdList1 = (LPITEMIDLIST) lParam1;
- LPITEMIDLIST pItemIdList2 = (LPITEMIDLIST) lParam2;
+ LPITEMIDLIST pItemIdList1 = lParam1;
+ LPITEMIDLIST pItemIdList2 = lParam2;
LISTVIEW_SORT_INFO *pSortInfo = (LPLISTVIEW_SORT_INFO) lpData;
@@ -945,7 +945,7 @@
ShellExecuteExW(&shexinfo); /* Discard error/success info */
- ILFree((LPITEMIDLIST)shexinfo.lpIDList);
+ ILFree(shexinfo.lpIDList);
}
}
@@ -1029,7 +1029,7 @@
ZeroMemory(&cmi, sizeof(cmi));
cmi.cbSize = sizeof(cmi);
cmi.hwnd = This->hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */
- cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand);
+ cmi.lpVerb = MAKEINTRESOURCEA(uCommand);
IContextMenu_InvokeCommand(pContextMenu, &cmi);
}
}
@@ -1054,7 +1054,7 @@
ZeroMemory(&cmi, sizeof(cmi));
cmi.cbSize = sizeof(cmi);
- cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand);
+ cmi.lpVerb = MAKEINTRESOURCEA(uCommand);
cmi.hwnd = This->hWndParent;
IContextMenu2_InvokeCommand(pCM, &cmi);
@@ -1625,7 +1625,7 @@
{
case WM_NCCREATE:
lpcs = (LPCREATESTRUCTW)lParam;
- pThis = (IShellViewImpl*)(lpcs->lpCreateParams);
+ pThis = lpcs->lpCreateParams;
SetWindowLongPtrW(hWnd, GWLP_USERDATA, (ULONG_PTR)pThis);
pThis->hWnd = hWnd; /*set the window handle*/
break;
@@ -1687,27 +1687,27 @@
}
else if(IsEqualIID(riid, &IID_IShellView))
{
- *ppvObj = (IShellView*)This;
+ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IShellView2))
{
- *ppvObj = (IShellView2*)This;
+ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IOleCommandTarget))
{
- *ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget);
+ *ppvObj = &This->lpvtblOleCommandTarget;
}
else if(IsEqualIID(riid, &IID_IDropTarget))
{
- *ppvObj = (IDropTarget*)&(This->lpvtblDropTarget);
+ *ppvObj = &This->lpvtblDropTarget;
}
else if(IsEqualIID(riid, &IID_IDropSource))
{
- *ppvObj = (IDropSource*)&(This->lpvtblDropSource);
+ *ppvObj = &This->lpvtblDropSource;
}
else if(IsEqualIID(riid, &IID_IViewObject))
{
- *ppvObj = (IViewObject*)&(This->lpvtblViewObject);
+ *ppvObj = &This->lpvtblViewObject;
}
if(*ppvObj)
@@ -2104,18 +2104,11 @@
if (!RegisterClassW(&wc)) return E_FAIL;
}
- wnd = CreateWindowExW(0,
- SV_CLASS_NAME,
- NULL,
- WS_CHILD | WS_TABSTOP,
- view_params->prcView->left,
- view_params->prcView->top,
+ wnd = CreateWindowExW(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_TABSTOP,
+ view_params->prcView->left, view_params->prcView->top,
view_params->prcView->right - view_params->prcView->left,
view_params->prcView->bottom - view_params->prcView->top,
- This->hWndParent,
- 0,
- shell32_hInstance,
- (LPVOID)This);
+ This->hWndParent, 0, shell32_hInstance, This);
CheckToolbar(This);
diff --git a/dlls/shell32/shpolicy.c b/dlls/shell32/shpolicy.c
index 8441a74..9ca8b46 100644
--- a/dlls/shell32/shpolicy.c
+++ b/dlls/shell32/shpolicy.c
@@ -897,15 +897,15 @@
{
if (SHELL_OsIsUnicode())
{
- if (lstrcmpiW((LPCWSTR)inpRegKey, strRegistryPolicyW) &&
- lstrcmpiW((LPCWSTR)inpRegKey, strPolicyW))
+ if (lstrcmpiW(inpRegKey, strRegistryPolicyW) &&
+ lstrcmpiW(inpRegKey, strPolicyW))
/* doesn't match, fail */
return 0;
}
else
{
- if (lstrcmpiA((LPCSTR)inpRegKey, strRegistryPolicyA) &&
- lstrcmpiA((LPCSTR)inpRegKey, strPolicyA))
+ if (lstrcmpiA(inpRegKey, strRegistryPolicyA) &&
+ lstrcmpiA(inpRegKey, strPolicyA))
/* doesn't match, fail */
return 0;
}
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index a51dba0..ededdec 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -1212,7 +1212,7 @@
static DWORD CALLBACK ddeThread(LPVOID arg)
{
- dde_thread_info_t *info = (dde_thread_info_t *)arg;
+ dde_thread_info_t *info = arg;
assert(info && info->filename);
PostThreadMessage(info->threadIdParent,
WM_QUIT,
@@ -1266,7 +1266,7 @@
denyNextConnection = TRUE;
ddeExec[0] = 0;
- assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId));
+ assert(CreateThread(NULL, 0, ddeThread, &info, 0, &threadId));
while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg);
rc = msg.wParam > 32 ? 33 : msg.wParam;
if ((test->todo & 0x1)==0)
@@ -1419,7 +1419,7 @@
* so don't wait for it */
SetEvent(hEvent);
- assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId));
+ assert(CreateThread(NULL, 0, ddeThread, &info, 0, &threadId));
while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg);
rc = msg.wParam > 32 ? 33 : msg.wParam;