git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Stefan Beller <stefanbeller@googlemail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
Date: Sun, 29 Sep 2013 10:07:25 -0500	[thread overview]
Message-ID: <CAMP44s069BUJiv1K3a2nkwT1A8fo=Vn0+8WFePHqBg_PBx_17g@mail.gmail.com> (raw)
In-Reply-To: <1380456534-7582-1-git-send-email-stefanbeller@googlemail.com>

On Sun, Sep 29, 2013 at 7:08 AM, Stefan Beller
<stefanbeller@googlemail.com> wrote:
> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index de3d72c..60afa51 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
>
>  # CFLAGS and LDFLAGS are for the users to override from the command line.
>
> -CFLAGS = -g -O2 -Wall
> +CFLAGS = -g -O2 -Wall -Wno-format-zero-length

Oh yes please.

However, somebody mentioned that this might break compilers other than
gcc, but perhaps we can do what Linux does:

cc-disable-warning = $(call try-run,\
$(CC) $(CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))

CFLAGS = -g -O2 -Wall $(call cc-disable-warning,format-zero-length,)

-- 
Felipe Contreras

  reply	other threads:[~2013-09-29 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 23:36 What's cooking in git.git (Jul 2013, #04; Thu, 11) Junio C Hamano
2013-09-29 12:08 ` [PATCH] Makefile: suppress false positive warnings of empty format string Stefan Beller
2013-09-29 15:07   ` Felipe Contreras [this message]
2013-09-29 15:23     ` Ramsay Jones
2013-09-29 19:00   ` Jonathan Nieder
2013-09-30 20:14     ` Jeff King
2013-09-30 21:26       ` Jonathan Nieder
2013-09-30 21:34         ` Jeff King
2013-09-30 21:38       ` Stefan Beller
2013-09-30 23:23         ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAMP44s069BUJiv1K3a2nkwT1A8fo=Vn0+8WFePHqBg_PBx_17g@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=stefanbeller@googlemail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).