From 2912254039cdf3e37951567cfd89a7465bd158d4 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Tue, 7 Jan 2025 15:48:53 -0800 Subject: [PATCH] Fix GET_FUNCTION_PTR warnings on windows - Fix the cast from FARPROC to void* in GET_FUNCTION_PTR Signed-off-by: Neil R. Spruit --- source/inc/ze_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/inc/ze_util.h b/source/inc/ze_util.h index 2d144780..1a80266f 100644 --- a/source/inc/ze_util.h +++ b/source/inc/ze_util.h @@ -36,7 +36,7 @@ inline void getLastErrorString(std::string &errorValue) { # define GET_LIBRARY_ERROR(ERROR_STRING) getLastErrorString(ERROR_STRING) # define FREE_DRIVER_LIBRARY(LIB) FreeLibrary(LIB) # define FREE_DRIVER_LIBRARY_FAILURE_CHECK(RESULT) (RESULT) == 0 ? true : false -# define GET_FUNCTION_PTR(LIB, FUNC_NAME) GetProcAddress(LIB, FUNC_NAME) +# define GET_FUNCTION_PTR(LIB, FUNC_NAME) reinterpret_cast(GetProcAddress(LIB, FUNC_NAME)) # define string_copy_s strncpy_s #else # include