git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Benoit Pierre <benoit.pierre@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 0/2] fix status_printf_ln calls "zero-length format" warnings
Date: Tue, 11 Mar 2014 12:25:45 -0700	[thread overview]
Message-ID: <xmqq38ior0zq.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140310195121.GB24568@sigill.intra.peff.net> (Jeff King's message of "Mon, 10 Mar 2014 15:51:21 -0400")

Jeff King <peff@peff.net> writes:

> Most of us who compile with -Wall decided a while ago to use
> -Wno-format-zero-length, because it really is a silly complaint (it
> assumes there are no side effects of the function besides printing the
> format string, which is obviously not true in this case).
>
> It would be nice to compile out of the box with "-Wall -Werror", and I
> think your solution looks relatively clean. But I am slightly concerned
> about the assumption that it is OK to pass a NULL fmt parameter to a
> function marked with __attribute__((format)).  It certainly seems to be
> the case now, and I do not know of any plans for that to change, but it
> seems like a potentially obvious thing for the compiler to check.

Yes, exactly.

      reply	other threads:[~2014-03-11 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 19:27 [PATCH 0/2] fix status_printf_ln calls "zero-length format" warnings Benoit Pierre
2014-03-10 19:27 ` [PATCH 1/2] status: allow NULL fmt for status_printf/status_vprintf_ln Benoit Pierre
2014-03-10 20:13   ` Eric Sunshine
2014-03-10 19:27 ` [PATCH 2/2] fix status_printf_ln calls "zero-length format" warnings Benoit Pierre
2014-03-10 19:51 ` [PATCH 0/2] " Jeff King
2014-03-11 19:25   ` Junio C Hamano [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=xmqq38ior0zq.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=benoit.pierre@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).