From patchwork Mon Aug 30 15:59:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 63100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 82AFFB70ED for ; Tue, 31 Aug 2010 03:20:55 +1000 (EST) Received: from localhost ([127.0.0.1]:39082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq82O-0005e2-Cb for incoming@patchwork.ozlabs.org; Mon, 30 Aug 2010 13:20:52 -0400 Received: from [140.186.70.92] (port=36836 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq6lo-0004yt-TN for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:59:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq6ln-0007bO-U8 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:59:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23244) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq6ln-0007bI-Me for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:59:39 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7UFxbIQ031746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Aug 2010 11:59:37 -0400 Received: from localhost6.localdomain6 ([10.3.121.6]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7UFxMbp029916; Mon, 30 Aug 2010 11:59:35 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Mon, 30 Aug 2010 17:59:16 +0200 Message-Id: <1283183960-28404-11-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com> References: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com Subject: [Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen This keeps the compiler happy when building with -Wextra while effectively generating the same code. Signed-off-by: Jes Sorensen --- qjson.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qjson.c b/qjson.c index e4ee433..f259547 100644 --- a/qjson.c +++ b/qjson.c @@ -36,8 +36,9 @@ static void parse_json(JSONMessageParser *parser, QList *tokens) QObject *qobject_from_jsonv(const char *string, va_list *ap) { - JSONParsingState state = {}; + JSONParsingState state; + memset(&state, 0, sizeof(state)); state.ap = ap; json_message_parser_init(&state.parser, parse_json);