From e9961ec5a3c82b20e45cdbae0b806b120578bd3f Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 9 Aug 2018 16:07:09 +0000 Subject: [PATCH] Silence stupid fucking warnings git-svn-id: https://svn.eduke32.com/eduke32@6968 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/compat.cpp | 16 ++++++++-------- source/build/src/winbits.cpp | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/build/src/compat.cpp b/source/build/src/compat.cpp index e6aff835e..dfc28d140 100644 --- a/source/build/src/compat.cpp +++ b/source/build/src/compat.cpp @@ -90,7 +90,7 @@ char *Bgethomedir(void) if (hShell32 == NULL) return NULL; - aSHGetSpecialFolderPathA = (aSHGetSpecialFolderPathAtype)GetProcAddress(hShell32, "SHGetSpecialFolderPathA"); + aSHGetSpecialFolderPathA = (aSHGetSpecialFolderPathAtype)(void (*)(void))GetProcAddress(hShell32, "SHGetSpecialFolderPathA"); if (aSHGetSpecialFolderPathA != NULL) if (SUCCEEDED(aSHGetSpecialFolderPathA(NULL, appdata, CSIDL_APPDATA, FALSE))) { @@ -124,13 +124,13 @@ char *Bgetappdir(void) char *dir = NULL; #ifdef _WIN32 - TCHAR appdir[MAX_PATH]; + TCHAR appdir[MAX_PATH]; - if (GetModuleFileName(NULL, appdir, MAX_PATH) > 0) { - // trim off the filename - char *slash = Bstrrchr(appdir, '\\'); - if (slash) slash[0] = 0; - dir = Bstrdup(appdir); + if (GetModuleFileName(NULL, appdir, MAX_PATH) > 0) { + // trim off the filename + char *slash = Bstrrchr(appdir, '\\'); + if (slash) slash[0] = 0; + dir = Bstrdup(appdir); } #elif defined EDUKE32_OSX @@ -591,7 +591,7 @@ uint32_t Bgetsysmemsize(void) if (lib) { aGlobalMemoryStatusExType aGlobalMemoryStatusEx = - (aGlobalMemoryStatusExType)GetProcAddress(lib, "GlobalMemoryStatusEx"); + (aGlobalMemoryStatusExType)(void (*)(void))GetProcAddress(lib, "GlobalMemoryStatusEx"); if (aGlobalMemoryStatusEx) { diff --git a/source/build/src/winbits.cpp b/source/build/src/winbits.cpp index 956e7ca99..a31432cb1 100644 --- a/source/build/src/winbits.cpp +++ b/source/build/src/winbits.cpp @@ -186,7 +186,7 @@ static void ToggleDesktopComposition(BOOL compEnable) static HRESULT(WINAPI *aDwmEnableComposition)(UINT); if (!hDWMApiDLL && (hDWMApiDLL = LoadLibrary("DWMAPI.DLL"))) - aDwmEnableComposition = (HRESULT(WINAPI *)(UINT))GetProcAddress(hDWMApiDLL, "DwmEnableComposition"); + aDwmEnableComposition = (HRESULT(WINAPI *)(UINT))(void (*)(void))GetProcAddress(hDWMApiDLL, "DwmEnableComposition"); if (aDwmEnableComposition) { @@ -207,8 +207,8 @@ void win_open(void) HMODULE ebacktrace = LoadLibraryA(EBACKTRACEDLL); if (ebacktrace) { - dllSetString SetTechnicalName = (dllSetString) GetProcAddress(ebacktrace, "SetTechnicalName"); - dllSetString SetProperName = (dllSetString) GetProcAddress(ebacktrace, "SetProperName"); + dllSetString SetTechnicalName = (dllSetString) (void (*)(void))GetProcAddress(ebacktrace, "SetTechnicalName"); + dllSetString SetProperName = (dllSetString) (void (*)(void))GetProcAddress(ebacktrace, "SetProperName"); if (SetTechnicalName) SetTechnicalName(AppTechnicalName);