warnings: add switch, and disable pragma, warnings

This commit is contained in:
Danny Robson 2018-12-06 16:09:21 +11:00
parent f5a4420164
commit d333042d85

View File

@ -14,6 +14,9 @@ include (compile_flag)
append_compile_flag(-Wall) append_compile_flag(-Wall)
append_compile_flag(-Wextra) append_compile_flag(-Wextra)
append_compile_flag(-Wno-pragmas)
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# General warnings # General warnings
append_compile_flag(-Wbool-compare) append_compile_flag(-Wbool-compare)
@ -43,6 +46,7 @@ append_compile_flag(-Wunused-but-set-variable)
append_compile_flag(-Wunused-parameter) append_compile_flag(-Wunused-parameter)
append_compile_flag(-Wpessimizing-move) append_compile_flag(-Wpessimizing-move)
append_compile_flag(-Wswitch-enum) append_compile_flag(-Wswitch-enum)
append_compile_flag(-Wswitch)
# dont use unsafe-loop-optimisations as there are too many false positives # dont use unsafe-loop-optimisations as there are too many false positives
# with language primitives like range-for. # with language primitives like range-for.
@ -73,6 +77,7 @@ append_compile_flag(-Wno-implicit-fallthrough)
append_compile_flag(-Wshorten-64-to-32) append_compile_flag(-Wshorten-64-to-32)
append_compile_flag(-Wdeprecated) append_compile_flag(-Wdeprecated)
append_compile_flag(-Wcovered-switch-default) append_compile_flag(-Wcovered-switch-default)
append_compile_flag(-Wcovered-switch-default)
append_compile_flag(-Wno-gnu-string-literal-operator-template) append_compile_flag(-Wno-gnu-string-literal-operator-template)