From b846d8735312c199c28eed597c0a38f519cff5fa Mon Sep 17 00:00:00 2001 From: Simo Piiroinen Date: Tue, 14 Feb 2017 12:06:01 +0200 Subject: [PATCH] [compilation] Tune warning options Remove -Wdeclaration-after-statement as first using -std=gnu99 to allow c99 features and then explicitly requesting warnings about using c99 features makes little sense. Remove -W option as it is just backwards compatibility alias for -Wextra. Remove -Wformat as it is implied by having -Wall present. Signed-off-by: Simo Piiroinen --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8914e61..ab783de 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ test_gcc_flag() { # We use gnu99 instead of c99 because many have interpreted the standard # in a way that int64_t isn't defined on non-64 bit platforms. -CFLAGS="-Os -std=gnu99 -Wall -W -Wextra -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -finline-small-functions -Wno-unused-result -fstack-protector -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now -fPIE -fpie -pie" +CFLAGS="-Os -std=gnu99 -Wall -Wextra -pipe -Wold-style-definition -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -finline-small-functions -Wno-unused-result -fstack-protector -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now -fPIE -fpie -pie" LDFLAGS="-z relro -z now" AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[Enable debug @<:@default=false@:>@]),