From 938dddc43a73a9d5856ebc4d924173998bc37ff7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 29 Sep 2020 16:21:29 +0200 Subject: [PATCH] build: configure: only use my usual warning flags I don't care about having my variable declarations at the beginning of my functions, if I'm using C99 I should be able to use its features. --- configure.ac | 6 +++++- src/parse/local.am | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 941c52c..c6a1ad9 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,11 @@ AC_PROG_CC_C99 AC_PROG_CC_STDC # Warnings -AX_COMPILER_FLAGS([], [], [], [-Wall -Wextra -pedantic]) +AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -pedantic]) +AS_IF( + [test "x$ax_enable_debug" = "xyes"], + [AX_APPEND_COMPILE_FLAGS([-Werror])] +) # Use Address-santizer in debug, if it is available AS_IF( diff --git a/src/parse/local.am b/src/parse/local.am index eede5b3..957c6b4 100644 --- a/src/parse/local.am +++ b/src/parse/local.am @@ -24,4 +24,5 @@ BUILT_SOURCES += \ # Remove problematic warnings from generated files libparse_a_CFLAGS = \ -Wno-switch-default \ + -Wno-unused-function \ $(NULL)