ISO C correct fix for casting void* to function pointer
authorSam Lantinga <slouken@libsdl.org>
Sun, 11 Feb 2018 15:29:36 -0800
changeset 11863b3944d2ef793
parent 11862 0f2ae46e429c
child 11864 2eff89e82b60
ISO C correct fix for casting void* to function pointer
src/video/windows/SDL_windowsvulkan.c
     1.1 --- a/src/video/windows/SDL_windowsvulkan.c	Sun Feb 11 18:16:01 2018 -0500
     1.2 +++ b/src/video/windows/SDL_windowsvulkan.c	Sun Feb 11 15:29:36 2018 -0800
     1.3 @@ -57,7 +57,7 @@
     1.4          return -1;
     1.5      SDL_strlcpy(_this->vulkan_config.loader_path, path,
     1.6                  SDL_arraysize(_this->vulkan_config.loader_path));
     1.7 -    vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) SDL_LoadFunction(
     1.8 +    *(void **)&vkGetInstanceProcAddr = SDL_LoadFunction(
     1.9          _this->vulkan_config.loader_handle, "vkGetInstanceProcAddr");
    1.10      if(!vkGetInstanceProcAddr)
    1.11          goto fail;