git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Ralf Thielow via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Alban Gruin <alban.gruin@gmail.com>,
	Ralf Thielow <ralf.thielow@gmail.com>
Subject: Re: [PATCH] config.mak.dev: re-enable -Wformat-zero-length
Date: Fri, 28 Feb 2020 08:42:47 -0800	[thread overview]
Message-ID: <xmqqtv3aek8o.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200227235445.GA1371170@coredump.intra.peff.net> (Jeff King's message of "Thu, 27 Feb 2020 18:54:45 -0500")

Jeff King <peff@peff.net> writes:

> The short of it is that we probably can't just disable the warning for
> everybody because of portability issues. And ignoring it for developers
> puts us in the situation we're in now, where non-dev builds are annoyed.

"git blame" unfortunately is very bad at poing at a commit that
removed something, so I do not offhand know how much it would help
readers who later wonder "oh, I am sure we had thing to disable
format-zero-length warning, and I want to learn the reason why we
dropped it", but thanks for writing this down.

> Since the workaround is both rarely needed and fairly straight-forward,
> let's just commit to doing it as necessary, and re-enable the warning.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> I had totally forgotten about that thread until researching the history
> just now. There's another option there involving #pragma, but it was too
> gross for me to even suggest now as an alternative in the commit
> message. ;) I think this is the most practical improvement.
>
>  config.mak.dev | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/config.mak.dev b/config.mak.dev
> index bf1f3fcdee..89b218d11a 100644
> --- a/config.mak.dev
> +++ b/config.mak.dev
> @@ -9,7 +9,6 @@ endif
>  DEVELOPER_CFLAGS += -Wall
>  DEVELOPER_CFLAGS += -Wdeclaration-after-statement
>  DEVELOPER_CFLAGS += -Wformat-security
> -DEVELOPER_CFLAGS += -Wno-format-zero-length
>  DEVELOPER_CFLAGS += -Wold-style-definition
>  DEVELOPER_CFLAGS += -Woverflow
>  DEVELOPER_CFLAGS += -Wpointer-arith

  reply	other threads:[~2020-02-28 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 20:25 [PATCH] rebase-interactive.c: silence format-zero-length warnings Ralf Thielow via GitGitGadget
2020-02-27 23:54 ` [PATCH] config.mak.dev: re-enable -Wformat-zero-length Jeff King
2020-02-28 16:42   ` Junio C Hamano [this message]
2020-02-28 17:06     ` Jeff King
2020-03-03 10:17 ` [PATCH] rebase-interactive.c: silence format-zero-length warnings Alban Gruin
2020-03-03 14:20   ` Junio C Hamano

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=xmqqtv3aek8o.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=alban.gruin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=peff@peff.net \
    --cc=ralf.thielow@gmail.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).