From d183986adf3bad5d15accd58d467c2bd467924b6 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 2 Feb 2022 12:02:51 +0100 Subject: [PATCH] shell32: Use correct integral type. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- dlls/shell32/iconcache.c | 10 +++++++--- dlls/shell32/shellpath.c | 8 ++++---- dlls/shell32/shlview.c | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index 1ca4840dc58..1c61374a732 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -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; } diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 2f1573f8221..2c62f9d4b6a 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -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; diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 0ffe2e4e9cf..463af7ab92c 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -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; }