From 6edc9380f3afd82a2a2c65273a2ddbe22bee2cd4 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sun, 29 May 2016 18:24:06 +0200 Subject: [PATCH] app: fix warnings for win32 builds. Eliminates some "assignment from incompatible pointer type" warnings, on calls to GetProcAddress(). --- app/main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/main.c b/app/main.c index ea9af5677d..016f92530e 100644 --- a/app/main.c +++ b/app/main.c @@ -324,8 +324,9 @@ main (int argc, typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName); t_SetDllDirectoryA p_SetDllDirectoryA; - p_SetDllDirectoryA = GetProcAddress (GetModuleHandle ("kernel32.dll"), - "SetDllDirectoryA"); + p_SetDllDirectoryA = + (t_SetDllDirectoryA) GetProcAddress (GetModuleHandle ("kernel32.dll"), + "SetDllDirectoryA"); if (p_SetDllDirectoryA) (*p_SetDllDirectoryA) (""); } @@ -399,8 +400,9 @@ main (int argc, typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags); t_SetProcessDEPPolicy p_SetProcessDEPPolicy; - p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandle ("kernel32.dll"), - "SetProcessDEPPolicy"); + p_SetProcessDEPPolicy = + (t_SetProcessDEPPolicy) GetProcAddress (GetModuleHandle ("kernel32.dll"), + "SetProcessDEPPolicy"); if (p_SetProcessDEPPolicy) (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION); } @@ -411,8 +413,9 @@ main (int argc, typedef HRESULT (WINAPI *t_SetCurrentProcessExplicitAppUserModelID) (PCWSTR lpPathName); t_SetCurrentProcessExplicitAppUserModelID p_SetCurrentProcessExplicitAppUserModelID; - p_SetCurrentProcessExplicitAppUserModelID = GetProcAddress (GetModuleHandle ("shell32.dll"), - "SetCurrentProcessExplicitAppUserModelID"); + p_SetCurrentProcessExplicitAppUserModelID = + (t_SetCurrentProcessExplicitAppUserModelID) GetProcAddress (GetModuleHandle ("shell32.dll"), + "SetCurrentProcessExplicitAppUserModelID"); if (p_SetCurrentProcessExplicitAppUserModelID) (*p_SetCurrentProcessExplicitAppUserModelID) (L"gimp.GimpApplication"); }