diff options
Diffstat (limited to 'cmake/warnings.cmake')
-rw-r--r-- | cmake/warnings.cmake | 82 |
1 files changed, 55 insertions, 27 deletions
diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index 03d7a32..cd3cdf9 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -1,65 +1,93 @@ set(FUD_WARNINGS + # baseline -Werror - -Wstack-usage=2048 - -Wno-long-long - -Wno-error=long-long - -Wno-error=inline - -Wno-error=mismatched-tags -Wall - -Weffc++ + -Wextra -pedantic - -Wsizeof-pointer-memaccess -pedantic-errors - -Wextra + -Wstack-usage=2048 # GCC specific + -Wvla # variable modified types don't play nice in C++ + # types + -Wlong-long + -Wlong-long + -Winline + # memory / data / array / string + -Wsizeof-pointer-memaccess -Wpacked - -Wshadow - -Wvla - -Wnull-dereference -Wuninitialized -Wstack-protector -Warray-bounds -Woverlength-strings -Wwrite-strings - -Wcast-qual -Wcast-align - -Wdisabled-optimization + -Wchar-subscripts + -Wpointer-arith + -Wstrict-aliasing + -Wstrict-aliasing=2 + -Wstrict-null-sentinel + # classes / initialization + -Weffc++ + -Wmismatched-tags -Wmissing-field-initializers - -Wimport -Winit-self - -Wchar-subscripts - -Wcomment - -Wconversion - -Wfloat-equal + -Wctor-dtor-privacy + -Wnon-virtual-dtor + -Wsuggest-final-types + -Wsuggest-final-methods + -Wsuggest-override + # format -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wmissing-format-attribute + -Wformat-overflow + -Wformat-security + -Wformat-signedness + # floats and signedness + -Wfloat-equal + -Wsign-compare + -Wsign-conversion + -Wdouble-promotion + # semantics / style + -Wshadow + -Wnull-dereference + -Wimplicit-fallthrough=5 + -Wduplicated-branches + -Wduplicated-cond + -Wcast-qual + -Wcomment + -Wconversion -Wmissing-braces -Winvalid-pch -Wmissing-include-dirs - -Wmissing-noreturn -Wparentheses - -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point - -Wsign-compare - -Wstrict-aliasing - -Wstrict-aliasing=2 - -Wswitch - -Wswitch-default - -Wswitch-enum -Wtrigraphs -Wunknown-pragmas - -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable + -Wswitch + -Wswitch-default + -Wswitch-enum + # this plays badly with clangd + # -Wzero-as-null-pointer-constant + -Wlogical-op + -Wuseless-cast + -Wextra-semi + -Wredundant-decls + -Wmisleading-indentation + # optmizations + -Wdisabled-optimization + -Wmissing-noreturn -Wvariadic-macros -Wvolatile-register-var + -Wunreachable-code ) |