diff --git a/lib/wzmaplib/src/map_script.cpp b/lib/wzmaplib/src/map_script.cpp index 3d62e9d3acf..eda6d81b259 100644 --- a/lib/wzmaplib/src/map_script.cpp +++ b/lib/wzmaplib/src/map_script.cpp @@ -35,6 +35,10 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-function-type" #endif +#if defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 19 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif #if defined(_MSC_VER) __pragma(warning( push )) __pragma(warning( disable : 4191 )) // disable "warning C4191: 'type cast': unsafe conversion from 'JSCFunctionMagic (__cdecl *)' to 'JSCFunction (__cdecl *)'" @@ -44,6 +48,9 @@ __pragma(warning( disable : 4191 )) // disable "warning C4191: 'type cast': unsa #if defined(_MSC_VER) __pragma(warning( pop )) #endif +#if defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 19 +#pragma clang diagnostic pop +#endif #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 8 #pragma GCC diagnostic pop #endif diff --git a/src/quickjs_backend.cpp b/src/quickjs_backend.cpp index f83159c84fc..555c00cc249 100644 --- a/src/quickjs_backend.cpp +++ b/src/quickjs_backend.cpp @@ -85,12 +85,19 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-function-type" #endif +#if defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 19 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif MSVC_PRAGMA(warning( push )) MSVC_PRAGMA(warning( disable : 4191 )) // disable "warning C4191: 'type cast': unsafe conversion from 'JSCFunctionMagic (__cdecl *)' to 'JSCFunction (__cdecl *)'" #include "quickjs.h" #include "quickjs-debugger.h" #include "quickjs-limitedcontext.h" MSVC_PRAGMA(warning( pop )) +#if defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 19 +#pragma clang diagnostic pop +#endif #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 8 #pragma GCC diagnostic pop #endif