[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Silence compiler warning in json test case
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH] Silence compiler warning in json test case |
Date: |
Sat, 16 Oct 2010 19:42:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Am 16.10.2010 18:28, Blue Swirl wrote:
> On Sat, Oct 16, 2010 at 12:37 AM, Paolo Bonzini <address@hidden> 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 <address@hidden>
This avoids
error: zero-length gnu_printf format string
Signed-off-by: Jan Kiszka <address@hidden>
---
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
- [Qemu-devel] [PATCH] configure: Support disabling warnings in $gcc_flags, (continued)
- [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Markus Armbruster, 2010/10/14
- [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Blue Swirl, 2010/10/14
- [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Paolo Bonzini, 2010/10/14
- [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Blue Swirl, 2010/10/14
- [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Paolo Bonzini, 2010/10/14
- Re: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Blue Swirl, 2010/10/15
- [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Paolo Bonzini, 2010/10/16
- Re: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string, Blue Swirl, 2010/10/16
- [Qemu-devel] [PATCH] Silence compiler warning in json test case,
Jan Kiszka <=
- Re: [Qemu-devel] [PATCH] Silence compiler warning in json test case, Luiz Capitulino, 2010/10/18