diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c index f6f679bd6d..616af55c51 100644 --- a/src/core/windows/SDL_windows.c +++ b/src/core/windows/SDL_windows.c @@ -120,7 +120,7 @@ void WIN_CoUninitialize(void) } #ifndef __WINRT__ -void *WIN_LoadComBaseFunction(const char *name) +FARPROC WIN_LoadComBaseFunction(const char *name) { static SDL_bool s_bLoaded; static HMODULE s_hComBase; diff --git a/src/core/windows/SDL_windows.h b/src/core/windows/SDL_windows.h index 6104495655..67333ac34f 100644 --- a/src/core/windows/SDL_windows.h +++ b/src/core/windows/SDL_windows.h @@ -134,7 +134,7 @@ extern int WIN_SetError(const char *prefix); #ifndef __WINRT__ /* Load a function from combase.dll */ -void *WIN_LoadComBaseFunction(const char *name); +FARPROC WIN_LoadComBaseFunction(const char *name); #endif /* Wrap up the oddities of CoInitialize() into a common function. */ diff --git a/src/loadso/windows/SDL_sysloadso.c b/src/loadso/windows/SDL_sysloadso.c index 92a61beb00..12a7d6956a 100644 --- a/src/loadso/windows/SDL_sysloadso.c +++ b/src/loadso/windows/SDL_sysloadso.c @@ -60,7 +60,7 @@ void *SDL_LoadObject(const char *sofile) SDL_FunctionPointer SDL_LoadFunction(void *handle, const char *name) { - void *symbol = (void *)GetProcAddress((HMODULE)handle, name); + SDL_FunctionPointer symbol = (SDL_FunctionPointer)GetProcAddress((HMODULE)handle, name); if (!symbol) { char errbuf[512]; SDL_strlcpy(errbuf, "Failed loading ", SDL_arraysize(errbuf)); diff --git a/src/thread/SDL_thread_c.h b/src/thread/SDL_thread_c.h index 42737a59e9..9ae2720b84 100644 --- a/src/thread/SDL_thread_c.h +++ b/src/thread/SDL_thread_c.h @@ -69,7 +69,7 @@ struct SDL_Thread int(SDLCALL *userfunc)(void *); void *userdata; void *data; - void *endfunc; /* only used on some platforms. */ + SDL_FunctionPointer endfunc; /* only used on some platforms. */ }; /* This is the function called to run a thread */ diff --git a/src/thread/windows/SDL_systhread.c b/src/thread/windows/SDL_systhread.c index c8b564f7a5..e2643f0993 100644 --- a/src/thread/windows/SDL_systhread.c +++ b/src/thread/windows/SDL_systhread.c @@ -82,7 +82,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread) const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0; /* Save the function which we will have to call to clear the RTL of calling app! */ - thread->endfunc = pfnEndThread; + thread->endfunc = (SDL_FunctionPointer)pfnEndThread; /* thread->stacksize == 0 means "system default", same as win32 expects */ if (pfnBeginThread) { diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c index fb82675bc1..56c61a19e3 100644 --- a/src/video/SDL_blit.c +++ b/src/video/SDL_blit.c @@ -271,7 +271,7 @@ int SDL_CalculateBlit(SDL_Surface *surface) blit = SDL_Blit_Slow; } } - map->data = blit; + map->data = (void *)blit; /* Make sure we have a blit function */ if (!blit) { diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c index d7bc3146be..6d4e90e9fd 100644 --- a/src/video/windows/SDL_windowsopengl.c +++ b/src/video/windows/SDL_windowsopengl.c @@ -214,13 +214,13 @@ int WIN_GL_LoadLibrary(SDL_VideoDevice *_this, const char *path) SDL_FunctionPointer WIN_GL_GetProcAddress(SDL_VideoDevice *_this, const char *proc) { - void *func; + SDL_FunctionPointer func; /* This is to pick up extensions */ - func = _this->gl_data->wglGetProcAddress(proc); + func = (SDL_FunctionPointer)_this->gl_data->wglGetProcAddress(proc); if (!func) { /* This is probably a normal GL function */ - func = GetProcAddress(_this->gl_config.dll_handle, proc); + func = (SDL_FunctionPointer)GetProcAddress(_this->gl_config.dll_handle, proc); } return func; } diff --git a/src/video/windows/SDL_windowsvulkan.c b/src/video/windows/SDL_windowsvulkan.c index b2eee2b56e..0115904f47 100644 --- a/src/video/windows/SDL_windowsvulkan.c +++ b/src/video/windows/SDL_windowsvulkan.c @@ -65,9 +65,9 @@ int WIN_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path) if (!vkGetInstanceProcAddr) { goto fail; } - _this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr; + _this->vulkan_config.vkGetInstanceProcAddr = (SDL_FunctionPointer)vkGetInstanceProcAddr; _this->vulkan_config.vkEnumerateInstanceExtensionProperties = - (void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)( + (SDL_FunctionPointer)vkGetInstanceProcAddr( VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties"); if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) { goto fail;