Silence stupid fucking warnings

git-svn-id: https://svn.eduke32.com/eduke32@6968 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-08-09 16:07:09 +00:00
parent 2c993de792
commit e9961ec5a3
2 changed files with 11 additions and 11 deletions

View File

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

View File

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