[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/18] AM_CFLAGS: Add -ansi -pedantic and some warnings
From: |
Tim Hentenaar |
Subject: |
[PATCH 01/18] AM_CFLAGS: Add -ansi -pedantic and some warnings |
Date: |
Sat, 4 Jul 2015 13:43:15 +0200 |
Signed-off-by: Tim Hentenaar <address@hidden>
---
src/Makefile.am | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 9f1089b..f764662 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,19 +18,26 @@ LIBS = @LIBINTL@ @LIBS@
MAINTAINERCLEANFILES= Makefile.in libgettext.h
+AM_CFLAGS=-ansi -pedantic -Wall -Werror -Wredundant-decls -Wshadow
+AM_CFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
+AM_CFLAGS+=-Wmissing-declarations -Wcomment -Wbad-function-cast
+AM_CFLAGS+=-Wcast-align -I.
+
## Use -g when in maintainer mode
if MAINTAINER_MODE
-AM_CFLAGS= -g -Wall -I.
-else
-AM_CFLAGS= -I.
+AM_CFLAGS += -g
endif
-
gperf.c: indent.gperf
- gperf -D -c -l -p -t -T -g -j1 -o -K rwd -N is_reserved indent.gperf >
gperf.c
+ @gperf -D -c -l -p -t -T -g -j1 -o -K rwd\
+ -L ANSI-C -N is_reserved indent.gperf > gperf.c
+ @sed -ie 's/index/idx/g' gperf.c
gperf-cc.c: indent-cc.gperf
- gperf -D -c -l -p -t -T -g -j1 -o -K rwd -N is_reserved_cc -H hash_cc
indent-cc.gperf > gperf-cc.c
+ @gperf -D -c -l -p -t -T -g -j1 -o -K rwd\
+ -L ANSI-C -N is_reserved_cc -H hash_cc\
+ indent-cc.gperf > gperf-cc.c
+ @sed -ie 's/index/idx/g' gperf-cc.c
if MAINTAINER_MODE
--
2.3.6
- [PATCH 00/18] Various fixes and improvements, Tim Hentenaar, 2015/07/04
- [PATCH 01/18] AM_CFLAGS: Add -ansi -pedantic and some warnings,
Tim Hentenaar <=
- [PATCH 02/18] indent.h: Remove redundant extern declaration of else_or_endif, Tim Hentenaar, 2015/07/04
- [PATCH 03/18] globs: Fix malloc() wrapper functions, Tim Hentenaar, 2015/07/04
- [PATCH 04/18] s/free/xfree/g, Tim Hentenaar, 2015/07/04
- [PATCH 05/18] Move need_chars into handletoken.c, Tim Hentenaar, 2015/07/04
- [PATCH 06/18] args: Compiler warning fixes, Tim Hentenaar, 2015/07/04
- [PATCH 07/18] gperf*.c: Fix compiler warnings, Tim Hentenaar, 2015/07/04
- [PATCH 08/18] texinfo2man: Fix potential buffer overruns and NULL pointer dereferences, Tim Hentenaar, 2015/07/04
- [PATCH 09/18] output.c: Remove dead code, Tim Hentenaar, 2015/07/04
- [PATCH 10/18] output.c: Fix potential NULL pointer dereferences, Tim Hentenaar, 2015/07/04
- [PATCH 11/18] output.c: Remove unused variable 'boolean_operator', Tim Hentenaar, 2015/07/04