build: add more warning flags

This commit is contained in:
Danny Robson 2014-07-02 15:35:59 +10:00
parent 4bc536ebdf
commit 9abc288532

View File

@ -43,18 +43,35 @@ AC_ARG_ENABLE([sanitizer], [
AX_APPEND_COMPILE_FLAGS([-Wall], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wextra], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wno-parentheses], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wcast-qual], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wcast-align], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wsign-compare], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wsign-conversion], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wtype-limits], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wcast-qual], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wfloat-equal], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wunused-parameter], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wunused-but-set-variable], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wshadow], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Winline], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wno-aggressive-loop-optimizations], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wnoexcept], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wno-parentheses], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wno-vla], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wredundant-decls], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wshadow], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wsign-compare], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wsign-promo], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wstrict-aliasing], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wtype-limits], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wunsafe-loop-optimizations], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wunused-but-set-variable], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wunused-parameter], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wuseless-cast], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-Wfloat-conversion], [], [-Werror])
#AX_APPEND_COMPILE_FLAGS([-Wold-style-cast], [], [-Werror])
#AX_APPEND_COMPILE_FLAGS([-Wdouble-promotion], [], [-Werror])
#AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual], [], [-Werror])
#AX_APPEND_COMPILE_FLAGS([-Wconversion], [], [-Werror])
#AX_APPEND_COMPILE_FLAGS([-Wsign-conversion], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-pedantic], [], [-Werror])