From 9a3567d5c0f6c451d008da003e64c5ba91e53842 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 29 Jul 2018 14:26:44 +0200 Subject: build: enable -Wdiscarded-qualifiers Except for the Python module because nothing in the CPython API is marked const and we'd have to cast everywhere. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9ae070c0..d35337cb 100644 --- a/configure.ac +++ b/configure.ac @@ -63,12 +63,16 @@ fi m4_ifndef([AX_COMPILER_FLAGS], [AC_MSG_ERROR(['autoconf-archive' missing])]) AX_COMPILER_FLAGS(,, [yes]) # These get triggered a lot, not worth it imo, but feel free to fix them -AX_APPEND_COMPILE_FLAGS([-Wno-discarded-qualifiers -Wno-duplicated-branches -Wno-switch-enum]) +AX_APPEND_COMPILE_FLAGS([-Wno-duplicated-branches -Wno-switch-enum]) # FIXME: Fix the warnings and remove the flags AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls -Wno-switch-default -Wno-shadow -Wno-deprecated-declarations -Wno-cast-function-type -Wno-type-limits]) AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough -Wno-suggest-attribute=format -Wno-double-promotion -Wno-sign-compare]) AX_APPEND_COMPILE_FLAGS([-Wno-incompatible-pointer-types]) +WARN_CFLAGS_PYTHON="$WARN_CFLAGS" +AX_APPEND_COMPILE_FLAGS([-Wno-discarded-qualifiers], [WARN_CFLAGS_PYTHON]) +AC_SUBST(WARN_CFLAGS_PYTHON) + # Checks for libraries. AC_CHECK_LIB([dl], [dlopen]) -- cgit v1.2.1