From 19b2a930bd17bddce50d72fc1b8347f3cbdf76e3 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 7 Dec 2024 17:47:55 +0000 Subject: [PATCH] winpr: Fix compiler error with SHGetKnownFolderPath argument This commit fixes the following gcc compiler error. FreeRDP/winpr/libwinpr/path/shell.c:226:67: error: passing argument 3 of 'SHGetKnownFolderPath' makes pointer from integer without a cast [-Wint-conversion] 226 | if (FAILED(SHGetKnownFolderPath(&FOLDERID_ProgramData, 0, -1, &wpath))) | ^~ | | | int --- winpr/libwinpr/path/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winpr/libwinpr/path/shell.c b/winpr/libwinpr/path/shell.c index 59d93a583..28895cd86 100644 --- a/winpr/libwinpr/path/shell.c +++ b/winpr/libwinpr/path/shell.c @@ -223,7 +223,7 @@ static char* GetPath_SYSTEM_CONFIG_HOME(void) #if defined(WIN32) && !defined(_UWP) WCHAR* wpath = NULL; - if (FAILED(SHGetKnownFolderPath(&FOLDERID_ProgramData, 0, -1, &wpath))) + if (FAILED(SHGetKnownFolderPath(&FOLDERID_ProgramData, 0, (HANDLE)-1, &wpath))) return NULL; if (wpath)