ref: b3304ae1ac7fef3d1551315f3cb1d60db19bbf77
parent: a48801a675938f4312b5c1bf3b869ca7beaacac9
author: ISSOtm <eldredhabert0@gmail.com>
date: Sat Feb 5 08:24:32 EST 2022
Add more warnings to `develop` As suggested by #969
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,11 +46,12 @@
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
--- a/Makefile
+++ b/Makefile
@@ -213,11 +213,12 @@
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 \