From: Azat Khuzhin Date: Sat, 12 Nov 2022 17:56:25 +0000 (+0100) Subject: Ignore unknown pragmas X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e346936d47a3a461f8ebaedabb2975bef3babf5;p=libevent Ignore unknown pragmas Since new compilers has new checks (like -Wdangling-pointer), and so to avoid extra checks in cmake/autotools, simply suppress if the pragma is unknown. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a72de00a..94fe4780 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,6 +317,8 @@ if (${GNUC}) # Disable unused-function warnings. These trigger for minheap-internal.h. -Wno-unused-function + + -Wno-pragmas ) if (${CLANG}) diff --git a/configure.ac b/configure.ac index cc961692..286b06c6 100644 --- a/configure.ac +++ b/configure.ac @@ -772,6 +772,9 @@ if test "$enable_gcc_warnings" != "no" && test "$GCC" = "yes"; then dnl Disable unused-function warnings. These trigger for minheap-internal.h. AX_CHECK_COMPILE_FLAG([-Wno-unused-function], [CFLAGS="$CFLAGS -Wno-unused-function"],[],[-Werror]) + dnl Disable unknown pragmas warnings. + AX_CHECK_COMPILE_FLAG([-Wno-pragmas], [CFLAGS="$CFLAGS -Wno-pragmas"],[],[-Werror]) + if test "$have_clang" = "yes"; then case "$host_os" in darwin*)