[PATCH 1/2] Compile with -Wstrict-prototypes -Wmissing-prototypes
Peter Colberg
peter at colberg.org
Wed Jan 13 23:25:06 CET 2016
Signed-off-by: Peter Colberg <peter at colberg.org>
---
cgit.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cgit.mk b/cgit.mk
index 1b50307..f8fc6b3 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -21,6 +21,11 @@ CGIT_CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
CGIT_CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
CGIT_CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
+# Warn if function is declared or defined without argument types
+CGIT_CFLAGS += -Wstrict-prototypes
+# Warn if function is defined without previous declaration in header
+CGIT_CFLAGS += -Wmissing-prototypes
+
ifdef NO_C99_FORMAT
CFLAGS += -DNO_C99_FORMAT
endif
--
2.7.0.rc3
More information about the CGit
mailing list