git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Stefan Beller <stefanbeller@googlemail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
Date: Mon, 30 Sep 2013 19:23:50 -0400	[thread overview]
Message-ID: <20130930232349.GB23218@sigill.intra.peff.net> (raw)
In-Reply-To: <5249EF59.4080607@googlemail.com>

On Mon, Sep 30, 2013 at 11:38:33PM +0200, Stefan Beller wrote:

> > To be honest, I'm surprised that "-Wall" doesn't create problems for
> > older "cc" implementations. We've had patches for compiling with
> > antique SUNWspro and MIPSpro compilers, and I sort of assumed that those
> > don't handle "-Wall". But maybe they do. Or maybe people doing that just
> > set CFLAGS themselves.
> 
> Well actually I do think people are encouraged to play around with their
> CFLAGS as much as they like. I do add link time optimisation usually.

Oh, absolutely. I didn't mean to give the impression that you should not
tweak CFLAGS. That's what it's there for. I just meant that I do not
recall seeing complaints from people on such compilers, so either it
actually works, or they are savvy enough to tweak CFLAGS without making
a complaint. Or they no longer exist. The patches I'm thinking of were
from 2008, and the compilers and systems were old then.

> However I do have the strong opinion that any serious project should
> compile without any warning/error with the standard compilers of
> the current time. That's why I started an attempt again to have
> -Wno-format-zero-length in there by default. Most of the people (I
> assume so) are using gcc. So it should build fine there without any
> warnings.

Yeah, I'd agree it is a good goal.

> Sure it should build without errors as well on other architectures, so
> I do understand the issue to check if we're really using gcc and can
> omit this flag if using another compiler.

Right, agreed.

> and here
> http://thread.gmane.org/gmane.comp.version-control.git/230806

Thanks, I didn't recall that one.

I still think if we are going to start doing gcc auto-detection in the
Makefile, it is slightly less ugly to just tweak the few callsites to
prevent the warning in the first place. I think gcc is being silly to
warn about, but it is the path of least resistance and maintenance.

-Peff

      reply	other threads:[~2013-09-30 23:23 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
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 [this message]

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=20130930232349.GB23218@sigill.intra.peff.net \
    --to=peff@peff.net \
    --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).