diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2023-02-12 21:02:08 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2023-02-19 16:11:06 +0100 |
commit | 463a1207f0766417866e2c28316e58a96f84370b (patch) | |
tree | c55a2f39f03f29e31e3ad79e917726ab59474105 | |
parent | c77417a683ac66f95daabb971a308ea7a12b5f85 (diff) | |
download | netifd-463a1207f0766417866e2c28316e58a96f84370b.tar.gz |
netifd: Activate -Wextra compile warnings
This activates some more compile warnings.
-pedantic is not yet activated, then we see too many errors which I do
not know how to mitigate.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b3bf411..b87c300 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,11 @@ IF(NOT ${CMAKE_VERSION} LESS 3.0) check_c_compiler_flag(-Wimplicit-fallthrough HAS_IMPLICIT_FALLTHROUGH) ENDIF() -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unknown-warning-option -Wno-format-truncation) +ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter) +IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6) + add_definitions(-Wextra -Werror=implicit-function-declaration) + add_definitions(-Wformat -Werror=format-security -Werror=format-nonliteral) +ENDIF() IF(HAS_IMPLICIT_FALLTHROUGH) ADD_DEFINITIONS(-Wimplicit-fallthrough) |