List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 1/2] Compile with -Wstrict-prototypes -Wmissing-prototypes
Date: Wed, 13 Jan 2016 23:29:25 +0000	[thread overview]
Message-ID: <20160113232925.GG14056@serenity.lan> (raw)
In-Reply-To: <1452723907-25898-2-git-send-email-peter@colberg.org>

On Wed, Jan 13, 2016 at 05:25:06PM -0500, Peter Colberg wrote:
> Signed-off-by: Peter Colberg <peter at colberg.org>
> ---

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


  reply	other threads:[~2016-01-13 23:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 19:28 [PATCH] ui-repolist: return HTTP 404 if no repositories found peter
2015-12-07 19:28 ` peter
2015-12-07 20:28   ` john
2015-12-08 17:53     ` [PATCH v2 0/2] " peter
2015-12-08 17:53       ` [PATCH v2 1/2] ui-repolist: extract repo visibility criteria to separate function peter
2016-01-13 16:15         ` Jason
2015-12-08 17:53       ` [PATCH v2 2/2] ui-repolist: return HTTP 404 if no repositories found peter
2016-01-13 16:21         ` Jason
2016-01-13 22:25           ` peter
2016-01-13 22:25             ` [PATCH 1/2] Compile with -Wstrict-prototypes -Wmissing-prototypes peter
2016-01-13 23:29               ` john [this message]
2016-01-14 13:01                 ` Jason
2016-01-14 13:12                   ` mailings
2016-01-14 13:32                   ` john
2016-01-14 13:35                     ` Jason
2016-01-13 22:25             ` [PATCH 2/2] Fix missing prototype declarations peter
2016-01-14 13:02               ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160113232925.GG14056@serenity.lan \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).