mirror of
https://github.com/notwa/rc
synced 2024-06-30 19:07:11 -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=pointer-to-int-cast
|
||||||
-Werror=int-to-pointer-cast
|
-Werror=int-to-pointer-cast
|
||||||
-Werror=return-type
|
-Werror=return-type
|
||||||
|
-Werror=memset-transposed-args
|
||||||
# -Werror=tautological-constant-out-of-range-compare # gcc doesn't like this
|
# -Werror=tautological-constant-out-of-range-compare # gcc doesn't like this
|
||||||
# -Werror=undef
|
# -Werror=undef
|
||||||
|
|
||||||
-Wno-unused
|
-Wno-unused
|
||||||
-Wno-padded
|
-Wno-padded
|
||||||
-Wno-missing-field-initializers
|
-Wno-missing-field-initializers
|
||||||
# -Wno-type-limits
|
# -Wno-type-limits # bad for generated code (macros, templates)
|
||||||
-Wno-misleading-indentation # gcc 6
|
-Wno-misleading-indentation # gcc 6
|
||||||
-Wno-disabled-macro-expansion # clang
|
-Wno-disabled-macro-expansion # clang
|
||||||
-Wno-language-extension-token # clang
|
-Wno-language-extension-token # clang
|
||||||
-Wno-unknown-warning-option # 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=(
|
welp=(
|
||||||
|
|
|
@ -217,6 +217,11 @@ compile() {
|
||||||
elif [[ $flag == -W* ]] && [[ $flag != -Wl* ]]; then
|
elif [[ $flag == -W* ]] && [[ $flag != -Wl* ]]; then
|
||||||
warnings+=($flag)
|
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
|
if [ $CC = cl ] && [ $flag = -Wall ]; then
|
||||||
# disable some obnoxious msvc warnings.
|
# disable some obnoxious msvc warnings.
|
||||||
warnings+=(
|
warnings+=(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user