From e1d81decf7a093867f051786a5d7f6ce4d827ff1 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 20 Nov 2018 12:32:18 +0000 Subject: build: make passing an incorrect pointer type a hard error More or less any of this issue pointed out by the compiler is a coding error. Make sure we flag it and bail loudly. v2: - apply the change to autotools and scons as well (Emil) - C++ doesn't need this, it's already an error and the flag doesn't exist (Gert) v3: - drop scons, flags are not checked so until someone adds that functionality we can't have this. Signed-off-by: Eric Engestrom Reviewed-by: Dylan Baker # v1 Reviewed-by: Emil Velikov # v1 [Emil: apply the same change to autotools and scons] Signed-off-by: Emil Velikov Reviewed-by: Eric Anholt --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f3c2c3040a1..d8124479c76 100644 --- a/configure.ac +++ b/configure.ac @@ -320,6 +320,7 @@ dnl AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"]) AX_CHECK_COMPILE_FLAG([-Werror=implicit-function-declaration], [CFLAGS="$CFLAGS -Werror=implicit-function-declaration"]) AX_CHECK_COMPILE_FLAG([-Werror=missing-prototypes], [CFLAGS="$CFLAGS -Werror=missing-prototypes"]) +AX_CHECK_COMPILE_FLAG([-Werror=incompatible-pointer-types], [CFLAGS="$CFLAGS -Werror=incompatible-pointer-types"]) AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"]) dnl Dylan Baker: gcc and clang always accepr -Wno-*, hence check for the original warning, then set the no-* flag AX_CHECK_COMPILE_FLAG([-Wmissing-field-initializers], [CFLAGS="$CFLAGS -Wno-missing-field-initializers"]) -- cgit v1.2.3