cmake: Add -Wstrict-prototypes during build
authorAndreas Schneider <asn@cryptomilk.org>
Sat, 12 Nov 2016 11:13:13 +0000 (12:13 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Sat, 12 Nov 2016 11:14:13 +0000 (12:14 +0100)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
cmake/Modules/DefineCompilerFlags.cmake

index 14d473f..cef5dc1 100644 (file)
@@ -13,7 +13,7 @@ if (UNIX AND NOT WIN32)
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wundef")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wundef -Wstrict-prototypes")
 
         # with -fPIC
         check_c_compiler_flag("-fPIC" WITH_FPIC)