]> granicus.if.org Git - libevent/commitdiff
Ignore unknown pragmas
authorAzat Khuzhin <azat@libevent.org>
Sat, 12 Nov 2022 17:56:25 +0000 (18:56 +0100)
committerAzat Khuzhin <azat@libevent.org>
Sat, 12 Nov 2022 18:00:10 +0000 (19:00 +0100)
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.

CMakeLists.txt
configure.ac

index a72de00a5fd7c0927c9e3800c7c4cfb542bd35c8..94fe4780009f73f38a7438426dff087f03b93584 100644 (file)
@@ -317,6 +317,8 @@ if (${GNUC})
 
          # Disable unused-function warnings. These trigger for minheap-internal.h.
          -Wno-unused-function
+
+         -Wno-pragmas
     )
 
     if (${CLANG})
index cc961692b67026564dac06b89a3a55f11968e4a9..286b06c645314506225aa418de9bb4b5fbae3bda 100644 (file)
@@ -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*)