mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 20:07:11 +00:00
BACKENDS: Fix MinGW warnings on GetProcAddress usages
Example: ../scummvm/backends/platform/sdl/win32/win32_wrapper.cpp:39:52: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'VerSetConditionMaskFunction' {aka 'long long unsigned int (*)(long long unsigned int, long unsigned int, unsigned char)'} [-Wcast-function-type] 39 | VerSetConditionMaskFunction verSetConditionMask = (VerSetConditionMaskFunction)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerSetConditionMask"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
1f6f82361f
commit
e7a9bf203f
@ -81,7 +81,7 @@ Win32DialogManager::~Win32DialogManager() {
|
||||
HRESULT winCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv) {
|
||||
typedef HRESULT(WINAPI *SHFunc)(PCWSTR, IBindCtx *, REFIID, void **);
|
||||
|
||||
SHFunc func = (SHFunc)GetProcAddress(GetModuleHandle(TEXT("shell32.dll")), "SHCreateItemFromParsingName");
|
||||
SHFunc func = (SHFunc)(void *)GetProcAddress(GetModuleHandle(TEXT("shell32.dll")), "SHCreateItemFromParsingName");
|
||||
if (func == NULL)
|
||||
return E_NOTIMPL;
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
ULONGLONG VerSetConditionMaskFunc(ULONGLONG dwlConditionMask, DWORD dwTypeMask, BYTE dwConditionMask) {
|
||||
typedef ULONGLONG(WINAPI *VerSetConditionMaskFunction)(ULONGLONG conditionMask, DWORD typeMask, BYTE conditionOperator);
|
||||
|
||||
VerSetConditionMaskFunction verSetConditionMask = (VerSetConditionMaskFunction)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerSetConditionMask");
|
||||
VerSetConditionMaskFunction verSetConditionMask = (VerSetConditionMaskFunction)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerSetConditionMask");
|
||||
if (verSetConditionMask == NULL)
|
||||
return 0;
|
||||
|
||||
@ -46,7 +46,7 @@ ULONGLONG VerSetConditionMaskFunc(ULONGLONG dwlConditionMask, DWORD dwTypeMask,
|
||||
BOOL VerifyVersionInfoFunc(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask) {
|
||||
typedef BOOL(WINAPI *VerifyVersionInfoFunction)(LPOSVERSIONINFOEXA versionInformation, DWORD typeMask, DWORDLONG conditionMask);
|
||||
|
||||
VerifyVersionInfoFunction verifyVersionInfo = (VerifyVersionInfoFunction)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerifyVersionInfoA");
|
||||
VerifyVersionInfoFunction verifyVersionInfo = (VerifyVersionInfoFunction)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerifyVersionInfoA");
|
||||
if (verifyVersionInfo == NULL)
|
||||
return FALSE;
|
||||
|
||||
@ -56,7 +56,7 @@ BOOL VerifyVersionInfoFunc(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwType
|
||||
HRESULT SHGetFolderPathFunc(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath) {
|
||||
typedef HRESULT (WINAPI *SHGetFolderPathFunc)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
|
||||
|
||||
SHGetFolderPathFunc pSHGetFolderPath = (SHGetFolderPathFunc)GetProcAddress(GetModuleHandle(TEXT("shell32.dll")), "SHGetFolderPathA");
|
||||
SHGetFolderPathFunc pSHGetFolderPath = (SHGetFolderPathFunc)(void *)GetProcAddress(GetModuleHandle(TEXT("shell32.dll")), "SHGetFolderPathA");
|
||||
if (pSHGetFolderPath)
|
||||
return pSHGetFolderPath(hwnd, csidl, hToken, dwFlags, pszPath);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user