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
This commit is contained in:
Biswapriyo Nath
2024-12-07 17:47:55 +00:00
parent cc6c3dd98b
commit 19b2a930bd

View File

@@ -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)