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:
parent
9a1dc4d488
commit
0d37a2bd61
13
home/-shrc
13
home/-shrc
|
@ -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=(
|
||||
|
|
|
@ -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+=(
|
||||
|
|
Loading…
Reference in New Issue
Block a user