From 2c6dde430a016fe3e290cbcf6aaec6dddaa6aba5 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 30 Jul 2025 10:00:08 -0400 Subject: [PATCH] Enable -Wstrict-prototypes when building CMake's C code Extend commit d06a9bdf3a (Enable some compiler warnings when building CMake, 2012-09-23, v2.8.11~420^2) to add `-Wstrict-prototypes`. Suggested-by: Matthew Woehlke --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19e2425f8c..dc9bdf546e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -495,6 +495,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common -Wundef + -Wstrict-prototypes ) set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W -Wshadow -Wpointer-arith -Wformat-security -Wundef