From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Silence compiler warning in json test case
Date: Sat, 16 Oct 2010 19:42:43 +0200 [thread overview]
Message-ID: <4CB9E413.5090400@web.de> (raw)
In-Reply-To: <AANLkTikXDR8hGHUOL84N9B8suTOnaN7fj0M_yuFTCtdN@mail.gmail.com>
Am 16.10.2010 18:28, Blue Swirl wrote:
> On Sat, Oct 16, 2010 at 12:37 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 10/15/2010 07:41 PM, Blue Swirl wrote:
>>>
>>> Which functions are optimized away and which aren't?
>>
>> It's builtins only that are optimized away or otherwise inlined (printf,
>> sprintf, etc.). Other calls stay, together with side effects and clock
>> cycles.
>
> Then the warning makes sense (slightly) and should remain on main QEMU side.
>
From: Jan Kiszka <jan.kiszka@siemens.com>
This avoids
error: zero-length gnu_printf format string
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
check-qjson.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/check-qjson.c b/check-qjson.c
index 0b60e45..64fcdcb 100644
--- a/check-qjson.c
+++ b/check-qjson.c
@@ -639,7 +639,9 @@ END_TEST
START_TEST(empty_input)
{
- QObject *obj = qobject_from_json("");
+ const char *empty = "";
+
+ QObject *obj = qobject_from_json(empty);
fail_unless(obj == NULL);
}
END_TEST
next prev parent reply other threads:[~2010-10-16 17:42 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
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 ` Jan Kiszka [this message]
2010-10-18 14:14 ` [Qemu-devel] [PATCH] Silence compiler warning in json test case 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=4CB9E413.5090400@web.de \
--to=jan.kiszka@web.de \
--cc=blauwirbel@gmail.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.