shell32: Use correct integral type.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-02 12:02:51 +01:00 committed by Alexandre Julliard
parent fd8d0babe1
commit d183986adf
3 changed files with 12 additions and 8 deletions

View file

@ -337,9 +337,13 @@ static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons
static BOOL get_imagelist_icon_size(int list, SIZE *size)
{
int cx, cy;
if (list < 0 || list >= ARRAY_SIZE(shell_imagelists)) return FALSE;
return ImageList_GetIconSize( shell_imagelists[list], &size->cx, &size->cy );
if (!ImageList_GetIconSize( shell_imagelists[list], &cx, &cy )) return FALSE;
size->cx = cx;
size->cy = cy;
return TRUE;
}
/****************************************************************************
@ -358,8 +362,8 @@ static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags)
for (i = 0; i < ARRAY_SIZE(hicons); i++)
{
get_imagelist_icon_size( i, &size );
if (!PrivateExtractIconsW( sourcefile, index, size.cx, size.cy, &hicons[i], 0, 1, 0 ))
if (!get_imagelist_icon_size( i, &size ) ||
!PrivateExtractIconsW( sourcefile, index, size.cx, size.cy, &hicons[i], 0, 1, 0 ))
WARN("Failed to load icon %d from %s.\n", index, debugstr_w(sourcefile));
if (!hicons[i]) goto fail;
}

View file

@ -3677,7 +3677,7 @@ static HRESULT get_known_folder_redirection_place(
{
HRESULT hr;
LPWSTR lpRegistryPath = NULL;
KF_CATEGORY category;
DWORD category;
/* first, get known folder's category */
hr = get_known_folder_registry_path(rfid, NULL, &lpRegistryPath);
@ -3918,7 +3918,7 @@ static HRESULT WINAPI knownfolder_GetCategory(
hr = E_FAIL;
if(SUCCEEDED(hr))
hr = get_known_folder_dword(knownfolder->registryPath, L"Category", pCategory);
hr = get_known_folder_dword(knownfolder->registryPath, L"Category", (DWORD *)pCategory);
return hr;
}
@ -3943,7 +3943,7 @@ static HRESULT get_known_folder_path(
DWORD dwSize, dwType;
WCHAR path[MAX_PATH] = {0};
WCHAR parentGuid[39];
KF_CATEGORY category;
DWORD category;
LPWSTR parentRegistryPath, parentPath;
HKEY hRedirectionRootKey = NULL;
@ -4138,7 +4138,7 @@ static HRESULT WINAPI knownfolder_GetFolderDefinition(
ZeroMemory(pKFD, sizeof(*pKFD));
/* required fields */
hr = get_known_folder_dword(knownfolder->registryPath, L"Category", &pKFD->category);
hr = get_known_folder_dword(knownfolder->registryPath, L"Category", (DWORD *)&pKFD->category);
if(FAILED(hr))
return hr;

View file

@ -3282,7 +3282,7 @@ static HRESULT WINAPI IShellFolderView_fnGetSelectedCount(
if (FAILED(hr))
return hr;
hr = IShellItemArray_GetCount(selection, count);
hr = IShellItemArray_GetCount(selection, (DWORD *)count);
IShellItemArray_Release(selection);
return hr;
}