From b3304ae1ac7fef3d1551315f3cb1d60db19bbf77 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sat, 5 Feb 2022 13:24:32 +0100 Subject: [PATCH] Add more warnings to `develop` As suggested by #969 --- CMakeLists.txt | 5 +++-- Makefile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10311ae5..854a6a5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,11 +46,12 @@ else() if(MORE_WARNINGS) add_compile_options(-Werror -Wextra - -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-cond + -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Winline -Wlogical-op -Wnested-externs -Wold-style-definition + -Wshift-overflow=2 -Wstrict-overflow=5 -Wstrict-prototypes -Wundef -Wuninitialized -Wunused -Wshadow # TODO: -Wshadow=compatible-local ? - -Wstringop-overflow=4 # TODO: would work better with optimizations + -Wnull-dereference -Wstringop-overflow=4 # TODO: would work better with optimizations -Wno-sign-compare # TODO: fix those warnings -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=1 -Wno-format-nonliteral # We have a couple of "dynamic" prints diff --git a/Makefile b/Makefile index 34bfc09c..5f07ce99 100644 --- a/Makefile +++ b/Makefile @@ -213,11 +213,12 @@ checkdiff: develop: $Qenv ${MAKE} WARNFLAGS="-Werror -Wextra \ - -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-cond \ + -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond \ -Wfloat-equal -Winline -Wlogical-op -Wnested-externs -Wold-style-definition \ + -Wshift-overflow=2 \ -Wstrict-overflow=5 -Wstrict-prototypes -Wundef -Wuninitialized -Wunused \ -Wshadow \ - -Wstringop-overflow=4 \ + -Wnull-dereference -Wstringop-overflow=4 \ -Wno-sign-compare \ -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=1 \ -Wno-format-nonliteral \