From 324eb395f34ee37179db0da52a109ccd6a639186 Mon Sep 17 00:00:00 2001 From: Zachary Henkel Date: Thu, 12 Sep 2024 11:52:00 -0700 Subject: [PATCH] Prevent `-Wcast-function-type-mismatch` diagnostics from clang (#1301) Merge now because the iOS build issue is unrelated. --- lib/include/public/mat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/include/public/mat.h b/lib/include/public/mat.h index 3ad8d36f7..535e0ac3a 100644 --- a/lib/include/public/mat.h +++ b/lib/include/public/mat.h @@ -370,7 +370,8 @@ extern "C" { { #ifdef _WIN32 /* This code accepts a handle of a library loaded in customer's code */ - evt_app_call_t impl = (evt_app_call_t)GetProcAddress((HMODULE)handle, "evt_api_call_default"); + /* The intermediate (void*) cast prevents incompatible function type cast diagnostics */ + evt_app_call_t impl = (evt_app_call_t)(void*)GetProcAddress((HMODULE)handle, "evt_api_call_default"); if (impl != NULL) { evt_api_call = impl;