]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Autoconf, CMake: Add a warning flag (-Wundef)
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 6 Mar 2024 20:21:00 +0000 (21:21 +0100)
committerfxlb <[email protected]>
Thu, 7 Mar 2024 06:39:23 +0000 (06:39 +0000)
CMakeLists.txt
aclocal.m4

index 6c25efa23bfe8ec3c52208cc25258fcab0b14f32..b0e4d8f57a9fc2ec3c717bcd14ab0c2ec4b32c42 100644 (file)
@@ -1023,6 +1023,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel)
         check_and_add_compiler_option(-Wshadow)
         check_and_add_compiler_option(-Wsign-compare)
         check_and_add_compiler_option(-Wstrict-prototypes)
+        check_and_add_compiler_option(-Wundef)
         check_and_add_compiler_option(-Wunreachable-code-return)
         check_and_add_compiler_option(-Wused-but-marked-unused)
         check_and_add_compiler_option(-Wwrite-strings)
index 7ddf4f3a6adee5ecf1e9f88ba663d88e9ae896b6..8a4da331d255c29aada81d2fe6c2f3e3ec3b84a9 100644 (file)
@@ -762,6 +762,7 @@ AC_DEFUN(AC_LBL_DEVEL,
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wshadow)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wsign-compare)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
+                   AC_LBL_CHECK_COMPILER_OPT($1, -Wundef)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wunreachable-code-return)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wunused-but-set-parameter)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wunused-but-set-variable)