Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b7de2660
Commit
b7de2660
authored
Nov 05, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Remove superfluous casts; mostly of void pointers.
parent
d7c0cbdc
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
31 additions
and
31 deletions
+31
-31
autocomplete.c
dlls/shell32/autocomplete.c
+1
-1
brsfolder.c
dlls/shell32/brsfolder.c
+1
-1
clipboard.c
dlls/shell32/clipboard.c
+4
-4
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+1
-1
dragdrophelper.c
dlls/shell32/dragdrophelper.c
+1
-1
enumidlist.c
dlls/shell32/enumidlist.c
+1
-1
iconcache.c
dlls/shell32/iconcache.c
+3
-3
pidl.c
dlls/shell32/pidl.c
+4
-4
shell.c
dlls/shell32/shell.c
+1
-1
shellole.c
dlls/shell32/shellole.c
+3
-3
shellord.c
dlls/shell32/shellord.c
+1
-1
shellstring.c
dlls/shell32/shellstring.c
+1
-1
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+1
-1
shfldr_netplaces.c
dlls/shell32/shfldr_netplaces.c
+1
-1
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+3
-3
shlmenu.c
dlls/shell32/shlmenu.c
+1
-1
shlview.c
dlls/shell32/shlview.c
+1
-1
shv_bg_cmenu.c
dlls/shell32/shv_bg_cmenu.c
+1
-1
string.c
dlls/shell32/tests/string.c
+1
-1
No files found.
dlls/shell32/autocomplete.c
View file @
b7de2660
...
...
@@ -638,7 +638,7 @@ static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
switch
(
uMsg
)
{
case
WM_MOUSEMOVE
:
sel
=
SendMessageW
(
hwnd
,
LB_ITEMFROMPOINT
,
0
,
lParam
);
SendMessageW
(
hwnd
,
LB_SETCURSEL
,
(
WPARAM
)
sel
,
(
LPARAM
)
0
);
SendMessageW
(
hwnd
,
LB_SETCURSEL
,
sel
,
0
);
break
;
case
WM_LBUTTONDOWN
:
sel
=
SendMessageW
(
hwnd
,
LB_GETCURSEL
,
0
,
0
);
...
...
dlls/shell32/brsfolder.c
View file @
b7de2660
...
...
@@ -813,7 +813,7 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
if
(
msg
==
WM_INITDIALOG
)
return
BrsFolder_OnCreate
(
hWnd
,
(
browse_info
*
)
lParam
);
info
=
(
browse_info
*
)
GetPropW
(
hWnd
,
szBrowseFolderInfo
);
info
=
GetPropW
(
hWnd
,
szBrowseFolderInfo
);
switch
(
msg
)
{
...
...
dlls/shell32/clipboard.c
View file @
b7de2660
...
...
@@ -88,7 +88,7 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
pDropFiles
=
(
DROPFILES
*
)
GlobalLock
(
hGlobal
);
pDropFiles
=
GlobalLock
(
hGlobal
);
offset
=
(
sizeof
(
DROPFILES
)
+
sizeof
(
WCHAR
)
-
1
)
/
sizeof
(
WCHAR
);
pDropFiles
->
pFiles
=
offset
*
sizeof
(
WCHAR
);
pDropFiles
->
fWide
=
TRUE
;
...
...
@@ -194,7 +194,7 @@ HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
/* fill the structure */
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
szFileName
=
(
char
*
)
GlobalLock
(
hGlobal
);
szFileName
=
GlobalLock
(
hGlobal
);
memcpy
(
szFileName
,
szTemp
,
size
);
GlobalUnlock
(
hGlobal
);
...
...
@@ -226,7 +226,7 @@ HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
/* fill the structure */
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
szFileName
=
(
WCHAR
*
)
GlobalLock
(
hGlobal
);
szFileName
=
GlobalLock
(
hGlobal
);
memcpy
(
szFileName
,
szTemp
,
size
);
GlobalUnlock
(
hGlobal
);
...
...
@@ -242,7 +242,7 @@ HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags)
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
sizeof
(
DWORD
));
if
(
!
hGlobal
)
return
hGlobal
;
pdwFlag
=
(
DWORD
*
)
GlobalLock
(
hGlobal
);
pdwFlag
=
GlobalLock
(
hGlobal
);
*
pdwFlag
=
dwFlags
;
GlobalUnlock
(
hGlobal
);
return
hGlobal
;
...
...
dlls/shell32/cpanelfolder.c
View file @
b7de2660
...
...
@@ -131,7 +131,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOI
if
(
pUnkOuter
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
return
CLASS_E_NOAGGREGATION
;
sf
=
(
ICPanelImpl
*
)
LocalAlloc
(
LMEM_ZEROINIT
,
sizeof
(
ICPanelImpl
));
sf
=
LocalAlloc
(
LMEM_ZEROINIT
,
sizeof
(
ICPanelImpl
));
if
(
!
sf
)
return
E_OUTOFMEMORY
;
...
...
dlls/shell32/dragdrophelper.c
View file @
b7de2660
...
...
@@ -71,7 +71,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
dth
=
(
IDropTargetHelperImpl
*
)
LocalAlloc
(
LMEM_ZEROINIT
,
sizeof
(
IDropTargetHelperImpl
));
dth
=
LocalAlloc
(
LMEM_ZEROINIT
,
sizeof
(
IDropTargetHelperImpl
));
if
(
!
dth
)
return
E_OUTOFMEMORY
;
dth
->
ref
=
0
;
...
...
dlls/shell32/enumidlist.c
View file @
b7de2660
...
...
@@ -71,7 +71,7 @@ BOOL AddToEnumList(
if
(
!
iface
||
!
pidl
)
return
FALSE
;
pNew
=
(
LPENUMLIST
)
SHAlloc
(
sizeof
(
ENUMLIST
));
pNew
=
SHAlloc
(
sizeof
(
ENUMLIST
));
if
(
pNew
)
{
/*set the next pointer */
...
...
dlls/shell32/iconcache.c
View file @
b7de2660
...
...
@@ -260,7 +260,7 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI
WCHAR
path
[
MAX_PATH
];
TRACE
(
"%s %i %p %p
\n
"
,
debugstr_w
(
sSourceFile
),
dwSourceIndex
,
hSmallIcon
,
hBigIcon
);
lpsice
=
(
LPSIC_ENTRY
)
SHAlloc
(
sizeof
(
SIC_ENTRY
));
lpsice
=
SHAlloc
(
sizeof
(
SIC_ENTRY
));
GetFullPathNameW
(
sSourceFile
,
MAX_PATH
,
path
,
NULL
);
lpsice
->
sSourceFile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
)
);
...
...
@@ -413,9 +413,9 @@ BOOL SIC_Initialize(void)
ImageList_SetBkColor
(
ShellBigIconList
,
CLR_NONE
);
/* Load the document icon, which is used as the default if an icon isn't found. */
hSm
=
(
HICON
)
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
IDI_SHELL_DOCUMENT
),
hSm
=
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
IDI_SHELL_DOCUMENT
),
IMAGE_ICON
,
cx_small
,
cy_small
,
LR_SHARED
);
hLg
=
(
HICON
)
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
IDI_SHELL_DOCUMENT
),
hLg
=
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
IDI_SHELL_DOCUMENT
),
IMAGE_ICON
,
cx_large
,
cy_large
,
LR_SHARED
);
if
(
!
hSm
||
!
hLg
)
...
...
dlls/shell32/pidl.c
View file @
b7de2660
...
...
@@ -232,7 +232,7 @@ LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl)
return
NULL
;
len
=
ILGetSize
(
pidl
);
newpidl
=
(
LPITEMIDLIST
)
SHAlloc
(
len
);
newpidl
=
SHAlloc
(
len
);
if
(
newpidl
)
memcpy
(
newpidl
,
pidl
,
len
);
...
...
@@ -259,7 +259,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
if
(
pidl
)
{
len
=
pidl
->
mkid
.
cb
;
pidlNew
=
(
LPITEMIDLIST
)
SHAlloc
(
len
+
2
);
pidlNew
=
SHAlloc
(
len
+
2
);
if
(
pidlNew
)
{
memcpy
(
pidlNew
,
pidl
,
len
+
2
);
/* 2 -> mind a desktop pidl */
...
...
@@ -464,7 +464,7 @@ LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl)
return
NULL
;
len
=
ILGetSize
(
pidl
);
newpidl
=
(
LPITEMIDLIST
)
Alloc
(
len
);
newpidl
=
Alloc
(
len
);
if
(
newpidl
)
memcpy
(
newpidl
,
pidl
,
len
);
...
...
@@ -725,7 +725,7 @@ HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEM
if
(
SUCCEEDED
(
hr
))
{
/*assert(pida->cidl==1);*/
LPIDA
pida
=
(
LPIDA
)
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPCITEMIDLIST
pidl_folder
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
0
]);
LPCITEMIDLIST
pidl_child
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
1
]);
...
...
dlls/shell32/shell.c
View file @
b7de2660
...
...
@@ -198,7 +198,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
return
0
;
hRet
=
GlobalAlloc16
(
GMEM_FIXED
|
GMEM_ZEROINIT
,
sizeof
(
*
RetPtr
)
*
n
);
RetPtr
=
(
HICON16
*
)
GlobalLock16
(
hRet
);
RetPtr
=
GlobalLock16
(
hRet
);
if
(
nIconIndex
==
(
UINT16
)
-
1
)
/* get number of icons */
{
...
...
dlls/shell32/shellole.c
View file @
b7de2660
...
...
@@ -548,7 +548,7 @@ BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p)
TRACE
(
"
\n
"
);
lpDropFileStruct
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
lpDropFileStruct
=
GlobalLock
(
hDrop
);
*
p
=
lpDropFileStruct
->
pt
;
bRet
=
lpDropFileStruct
->
fNC
;
...
...
@@ -569,7 +569,7 @@ UINT WINAPI DragQueryFileA(
{
LPSTR
lpDrop
;
UINT
i
=
0
;
DROPFILES
*
lpDropFileStruct
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
DROPFILES
*
lpDropFileStruct
=
GlobalLock
(
hDrop
);
TRACE
(
"(%p, %x, %p, %u)
\n
"
,
hDrop
,
lFile
,
lpszFile
,
lLength
);
...
...
@@ -624,7 +624,7 @@ UINT WINAPI DragQueryFileW(
{
LPWSTR
lpwDrop
;
UINT
i
=
0
;
DROPFILES
*
lpDropFileStruct
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
DROPFILES
*
lpDropFileStruct
=
GlobalLock
(
hDrop
);
TRACE
(
"(%p, %x, %p, %u)
\n
"
,
hDrop
,
lFile
,
lpszwFile
,
lLength
);
...
...
dlls/shell32/shellord.c
View file @
b7de2660
...
...
@@ -1641,7 +1641,7 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_
if
(
lRet
==
ERROR_SUCCESS
)
{
/* Create and initialize the Property Sheet Extensions Array */
psxa
=
(
PPSXA
)
LocalAlloc
(
LMEM_FIXED
,
FIELD_OFFSET
(
PSXA
,
pspsx
[
max_iface
]));
psxa
=
LocalAlloc
(
LMEM_FIXED
,
FIELD_OFFSET
(
PSXA
,
pspsx
[
max_iface
]));
if
(
psxa
)
{
ZeroMemory
(
psxa
,
FIELD_OFFSET
(
PSXA
,
pspsx
[
max_iface
]));
...
...
dlls/shell32/shellstring.c
View file @
b7de2660
...
...
@@ -242,7 +242,7 @@ DWORD WINAPI CheckEscapesA(
DWORD
ret
=
0
;
TRACE
(
"(%s %d)
\n
"
,
debugstr_a
(
string
),
len
);
wString
=
(
LPWSTR
)
LocalAlloc
(
LPTR
,
len
*
sizeof
(
WCHAR
));
wString
=
LocalAlloc
(
LPTR
,
len
*
sizeof
(
WCHAR
));
if
(
wString
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
string
,
len
,
wString
,
len
);
...
...
dlls/shell32/shfldr_fs.c
View file @
b7de2660
...
...
@@ -235,7 +235,7 @@ IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
if
(
pUnkOuter
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
return
CLASS_E_NOAGGREGATION
;
sf
=
(
IGenericSFImpl
*
)
LocalAlloc
(
LMEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
));
sf
=
LocalAlloc
(
LMEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
));
if
(
!
sf
)
return
E_OUTOFMEMORY
;
...
...
dlls/shell32/shfldr_netplaces.c
View file @
b7de2660
...
...
@@ -94,7 +94,7 @@ HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid,
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
sf
=
(
IGenericSFImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IGenericSFImpl
));
sf
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IGenericSFImpl
));
if
(
!
sf
)
return
E_OUTOFMEMORY
;
...
...
dlls/shell32/shfldr_unixfs.c
View file @
b7de2660
...
...
@@ -614,7 +614,7 @@ static HRESULT UNIXFS_path_to_pidl(UnixFolder *pUnixFolder, const WCHAR *path, L
/* Special case for the root folder. */
if
(
!
strcmp
(
szCompletePath
,
"/"
))
{
*
ppidl
=
pidl
=
(
LPITEMIDLIST
)
SHAlloc
(
sizeof
(
USHORT
));
*
ppidl
=
pidl
=
SHAlloc
(
sizeof
(
USHORT
));
if
(
!
pidl
)
return
E_FAIL
;
pidl
->
mkid
.
cb
=
0
;
/* Terminate the ITEMIDLIST */
return
S_OK
;
...
...
@@ -657,7 +657,7 @@ static HRESULT UNIXFS_path_to_pidl(UnixFolder *pUnixFolder, const WCHAR *path, L
SHFree
(
pszAPath
);
SHFree
(
pwszPath
);
*
ppidl
=
pidl
=
(
LPITEMIDLIST
)
SHAlloc
(
cPidlLen
);
*
ppidl
=
pidl
=
SHAlloc
(
cPidlLen
);
if
(
!
pidl
)
return
E_FAIL
;
/* Concatenate the SHITEMIDs of the sub-directories. */
...
...
@@ -2342,7 +2342,7 @@ static HRESULT WINAPI UnixSubFolderIterator_IEnumIDList_Skip(IEnumIDList* iface,
TRACE
(
"(iface=%p, celt=%d)
\n
"
,
iface
,
celt
);
/* Call IEnumIDList::Next and delete the resulting pidls. */
apidl
=
(
LPITEMIDLIST
*
)
SHAlloc
(
celt
*
sizeof
(
LPITEMIDLIST
));
apidl
=
SHAlloc
(
celt
*
sizeof
(
LPITEMIDLIST
));
hr
=
IEnumIDList_Next
(
iface
,
celt
,
apidl
,
&
cFetched
);
if
(
SUCCEEDED
(
hr
))
while
(
cFetched
--
)
...
...
dlls/shell32/shlmenu.c
View file @
b7de2660
...
...
@@ -330,7 +330,7 @@ static BOOL FileMenu_AppendItemW(
if
(
lpText
!=
FM_SEPARATOR
)
{
int
len
=
strlenW
(
lpText
);
myItem
=
(
LPFMITEM
)
SHAlloc
(
sizeof
(
FMITEM
)
+
len
*
sizeof
(
WCHAR
));
myItem
=
SHAlloc
(
sizeof
(
FMITEM
)
+
len
*
sizeof
(
WCHAR
));
strcpyW
(
myItem
->
szItemText
,
lpText
);
myItem
->
cchItemText
=
len
;
myItem
->
iIconIndex
=
icon
;
...
...
dlls/shell32/shlview.c
View file @
b7de2660
...
...
@@ -837,7 +837,7 @@ static UINT ShellView_GetSelections(IShellViewImpl * This)
SHFree
(
This
->
apidl
);
This
->
cidl
=
ListView_GetSelectedCount
(
This
->
hWndList
);
This
->
apidl
=
(
LPITEMIDLIST
*
)
SHAlloc
(
This
->
cidl
*
sizeof
(
LPITEMIDLIST
));
This
->
apidl
=
SHAlloc
(
This
->
cidl
*
sizeof
(
LPITEMIDLIST
));
TRACE
(
"selected=%i
\n
"
,
This
->
cidl
);
...
...
dlls/shell32/shv_bg_cmenu.c
View file @
b7de2660
...
...
@@ -292,7 +292,7 @@ static BOOL DoPaste(
if(hMem)
{
char * pDropFiles = (char *)
GlobalLock(hMem);
char * pDropFiles =
GlobalLock(hMem);
if(pDropFiles)
{
int len, offset = sizeof(DROPFILESTRUCT);
...
...
dlls/shell32/tests/string.c
View file @
b7de2660
...
...
@@ -37,7 +37,7 @@ static HRESULT (WINAPI *pStrRetToStrNAW)(LPVOID,DWORD,LPSTRRET,const ITEMIDLIST
static
WCHAR
*
CoDupStrW
(
const
char
*
src
)
{
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
NULL
,
0
);
WCHAR
*
szTemp
=
(
WCHAR
*
)
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
WCHAR
*
szTemp
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
szTemp
,
len
);
return
szTemp
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment