Skip to content

Commit

Permalink
Fix GET_FUNCTION_PTR warnings on windows (#255)
Browse files Browse the repository at this point in the history
- Fix the cast from FARPROC to void* in GET_FUNCTION_PTR

Signed-off-by: Neil R. Spruit <[email protected]>
  • Loading branch information
nrspruit authored Jan 9, 2025
1 parent 4fd42f5 commit 7f0f28e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/inc/ze_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<void *>(GetProcAddress(LIB, FUNC_NAME))
# define string_copy_s strncpy_s
#else
# include <link.h>
Expand Down

0 comments on commit 7f0f28e

Please sign in to comment.