qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string
Date: Thu, 14 Oct 2010 16:38:27 +0000	[thread overview]
Message-ID: <AANLkTi=d1H68MBa8Ye4eFbmenheMVJJ3spwShGo5ajxa@mail.gmail.com> (raw)
In-Reply-To: <m3zkuhf7wd.fsf@blackfin.pond.sub.org>

On Thu, Oct 14, 2010 at 9:20 AM, Markus Armbruster <armbru@redhat.com> wrote:
> Blue Swirl <blauwirbel@gmail.com> writes:
>
>> On Wed, Oct 13, 2010 at 7:19 AM, Markus Armbruster <armbru@redhat.com> wrote:
>>> Blue Swirl <blauwirbel@gmail.com> writes:
>>>
>>>> On Mon, Oct 11, 2010 at 12:52 PM, Markus Armbruster <armbru@redhat.com> wrote:
>>>>> Warns about this line in check-qjson.c:
>>>>>    QObject *obj = qobject_from_json("");
>>>>>
>>>>> The obvious fix (add -Wno-format-zero-length to gcc_flags) doesn't
>>>>> work, because -Wall switches it on again.  Fix by putting configured
>>>>> flags last.
>>>>
>>>> This would disable the flag globally. I'd rather disable the flag only
>>>> for check-qjson.o
>>>
>>> Is this warning worth the hassle?  What's the problem with empty format
>>> strings?
>>
>> Your fix solves this specific case, but it also degrades the gcc
>> checks of the mainstream code (slightly). I think the test suite need
>> not follow the level of checking that should be applied to mainstream,
>> or at least the warnings there should not be fatal.
>
> "Degrade" implies we miss something that's "wrong" enough to be worth
> avoiding.  What's wrong with empty format strings?

They generate useless calls to the formatting function, wasting
performance (slightly). Since there are no calls currently, this is of
course hypothetical.

We don't want those to appear in QEMU, but for test suite they may be
acceptable (for example, to test empty format string handling) because
test suite is not performance critical.

  reply	other threads:[~2010-10-14 16:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 12:52 [Qemu-devel] [PATCH] Suppress warning: zero-length gnu_printf format string Markus Armbruster
2010-10-11 13:09 ` [Qemu-devel] " Paolo Bonzini
2010-10-12 17:35 ` Blue Swirl
2010-10-13  7:19   ` Markus Armbruster
2010-10-13 18:57     ` Blue Swirl
2010-10-14  9:19       ` [Qemu-devel] [PATCH] configure: Support disabling warnings in $gcc_flags Markus Armbruster
2010-10-20 20:55         ` [Qemu-devel] " Blue Swirl
2010-10-14  9:20       ` [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string Markus Armbruster
2010-10-14 16:38         ` Blue Swirl [this message]
2010-10-14 17:52           ` Paolo Bonzini
2010-10-14 17:59             ` Blue Swirl
2010-10-15  1:33               ` Paolo Bonzini
2010-10-15 17:41                 ` Blue Swirl
2010-10-16  0:37                   ` Paolo Bonzini
2010-10-16 16:28                     ` Blue Swirl
2010-10-16 17:42                       ` [Qemu-devel] [PATCH] Silence compiler warning in json test case Jan Kiszka
2010-10-18 14:14                         ` Luiz Capitulino

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='AANLkTi=d1H68MBa8Ye4eFbmenheMVJJ3spwShGo5ajxa@mail.gmail.com' \
    --to=blauwirbel@gmail.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).