From: Joel Rosdahl Date: Fri, 15 Nov 2024 19:35:07 +0000 (+0100) Subject: build: Ignore Clang 19 -Wcast-function-type-mismatch warning X-Git-Tag: v4.11~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05976c39b54aa26e5ff6b37c5c40291f1be89796;p=thirdparty%2Fccache.git build: Ignore Clang 19 -Wcast-function-type-mismatch warning --- diff --git a/src/ccache/util/direntry.cpp b/src/ccache/util/direntry.cpp index 034eeeb5..2a3b9f7f 100644 --- a/src/ccache/util/direntry.cpp +++ b/src/ccache/util/direntry.cpp @@ -39,14 +39,19 @@ template Proc* get_proc_address(HMODULE module, const char* proc_name) { -# if defined __GNUC__ +# if __GNUC__ >= 8 # pragma GCC diagnostic push -# if __GNUC__ >= 8 -# pragma GCC diagnostic ignored "-Wcast-function-type" -# endif +# pragma GCC diagnostic ignored "-Wcast-function-type" +# endif +# if __clang_major__ >= 19 +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcast-function-type-mismatch" # endif return reinterpret_cast(GetProcAddress(module, proc_name)); -# if defined __GNUC__ +# if __clang_major__ >= 19 +# pragma clang diagnostic pop +# endif +# if __GNUC__ >= 8 # pragma GCC diagnostic pop # endif }