1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-25 16:57:12 -07:00

experimenting with more warnings

This commit is contained in:
Connor Olding 2017-10-05 12:08:08 +00:00
parent 9a1dc4d488
commit 0d37a2bd61
2 changed files with 17 additions and 1 deletions

View File

@ -98,17 +98,28 @@ whoa=(
-Werror=pointer-to-int-cast
-Werror=int-to-pointer-cast
-Werror=return-type
-Werror=memset-transposed-args
# -Werror=tautological-constant-out-of-range-compare # gcc doesn't like this
# -Werror=undef
-Wno-unused
-Wno-padded
-Wno-missing-field-initializers
# -Wno-type-limits
# -Wno-type-limits # bad for generated code (macros, templates)
-Wno-misleading-indentation # gcc 6
-Wno-disabled-macro-expansion # clang
-Wno-language-extension-token # clang
-Wno-unknown-warning-option # clang
# trying some stuff:
-Wduplicated-cond # gcc 6
-Wduplicated-branches # gcc 7
-Wlogical-op
-Wrestrict # gcc 7
-Wnull-dereference # gcc 6
-Wjump-misses-init
-Wdouble-promotion
-Wformat=2
)
welp=(

View File

@ -217,6 +217,11 @@ compile() {
elif [[ $flag == -W* ]] && [[ $flag != -Wl* ]]; then
warnings+=($flag)
if [ $sepples -eq 0 ] && [[ $flag == -Wextra ]] then
# enable some warnings just for C. too annoying in C++.
warnings+=(-Wshadow -Winline)
fi
if [ $CC = cl ] && [ $flag = -Wall ]; then
# disable some obnoxious msvc warnings.
warnings+=(