From: Francois-Xavier Le Bail Date: Wed, 6 Mar 2024 20:21:00 +0000 (+0100) Subject: Autoconf, CMake: Add a warning flag (-Wundef) X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/656bd18c7228bdbb845541dca7253af894eae536?ds=sidebyside Autoconf, CMake: Add a warning flag (-Wundef) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c25efa2..b0e4d8f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/aclocal.m4 b/aclocal.m4 index 7ddf4f3a..8a4da331 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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)