Received: from [140.186.70.92] (port=33372 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7qTx-00043k-LS for qemu-devel@nongnu.org; Mon, 18 Oct 2010 10:14:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7qTw-0004Nw-5s for qemu-devel@nongnu.org; Mon, 18 Oct 2010 10:14:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7qTv-0004Nn-Vg for qemu-devel@nongnu.org; Mon, 18 Oct 2010 10:14:32 -0400 Date: Mon, 18 Oct 2010 12:14:27 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH] Silence compiler warning in json test case Message-ID: <20101018121427.1992643a@doriath> In-Reply-To: <4CB9E413.5090400@web.de> References: <4CB74350.80201@redhat.com> <4CB7AF6F.4010104@redhat.com> <4CB9E413.5090400@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , Paolo Bonzini , qemu-devel@nongnu.org On Sat, 16 Oct 2010 19:42:43 +0200 Jan Kiszka wrote: > Am 16.10.2010 18:28, Blue Swirl wrote: > > On Sat, Oct 16, 2010 at 12:37 AM, Paolo Bonzini 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 > > This avoids > > error: zero-length gnu_printf format string > > Signed-off-by: Jan Kiszka I've applied this one to the QMP queue, but of course that Blue can push it if he wants to. > --- > 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 >