From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Wed, 13 Jan 2016 23:29:25 +0000 Subject: [PATCH 1/2] Compile with -Wstrict-prototypes -Wmissing-prototypes In-Reply-To: <1452723907-25898-2-git-send-email-peter@colberg.org> References: <1452723907-25898-1-git-send-email-peter@colberg.org> <1452723907-25898-2-git-send-email-peter@colberg.org> Message-ID: <20160113232925.GG14056@serenity.lan> On Wed, Jan 13, 2016 at 05:25:06PM -0500, Peter Colberg wrote: > Signed-off-by: Peter Colberg > --- I don't think we want to do this in the generic makefile. Not all compilers will support these options so we can't blindly add them to CFLAGS. Especially not CGIT_CFLAGS which is designed to be options to compile the program; this is more along the lines of user customization which would go in CFLAGS (which is expected to be overridden in the environment or on the make command line) before being captured into CGIT_CFLAGS. You can update CFLAGS in cgit.conf or git/config.mak for site-specific customization. Maybe Ferry can set that up on his Jenkins instance. > 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