From 9abc2885325966eadadcaaa7447a585bde807edd Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 2 Jul 2014 15:35:59 +1000 Subject: [PATCH] build: add more warning flags --- configure.ac | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 26e47e1d..9d70450e 100644 --- a/configure.ac +++ b/configure.ac @@ -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])