From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Thu, 14 Jan 2016 13:32:58 +0000 Subject: [PATCH 1/2] Compile with -Wstrict-prototypes -Wmissing-prototypes In-Reply-To: References: <1452723907-25898-1-git-send-email-peter@colberg.org> <1452723907-25898-2-git-send-email-peter@colberg.org> <20160113232925.GG14056@serenity.lan> Message-ID: <20160114133258.GJ14056@serenity.lan> On Thu, Jan 14, 2016 at 02:01:32PM +0100, Jason A. Donenfeld wrote: > John - what compilers do you have in mind that don't accept this flag? > I rather like it. SunStudio certainly doesn't support these diagnostics. I'm following what git.git does in this regard. If you check git/Makefile you'll see that it sets -Wall but nothing else. Since our makefile is derived from that I'd prefer to follow the same principle. The important thing is that we maintain the CFLAGS/CGIT_CFLAGS split for compiler tuning vs. "functional" flags; warnings are in the former category and should be in CFLAGS but we need to think carefully about where to add those and allow the user to override them. I think they would have to go in cgit.mk between "include Makefile" and "-include $(CGIT_PREFIX)cgit.conf" which allows users to override them in cgit.conf but not in git/config.mak. I would much rather that we add a wrapper akin to Junio's maintainer "Make" for git.git [1] that compiles with these stricter flags rather than modifying the default makefile and causing pain for those on less common systems. It only takes a couple of people to have this turned on for us to catch these issues reasonably quickly. [1] https://github.com/git/git/blob/todo/Make