From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB5c1-0001Up-F0 for qemu-devel@nongnu.org; Tue, 13 Jan 2015 12:50:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YB5bw-0004NU-TZ for qemu-devel@nongnu.org; Tue, 13 Jan 2015 12:50:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB5bw-0004N2-9b for qemu-devel@nongnu.org; Tue, 13 Jan 2015 12:50:36 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0DHoYWs006839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 13 Jan 2015 12:50:35 -0500 From: Markus Armbruster Date: Tue, 13 Jan 2015 18:50:26 +0100 Message-Id: <1421171432-8733-4-git-send-email-armbru@redhat.com> In-Reply-To: <1421171432-8733-1-git-send-email-armbru@redhat.com> References: <1421171432-8733-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 3/9] hmp: Compile hmp_info_spice() only with CONFIG_SPICE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com, lcapitulino@redhat.com It's dead code when CONFIG_SPICE is off. If it wasn't, it would crash dereferencing the null pointer returned by the qmp_query_spice() dummy in qmp.c. Signed-off-by: Markus Armbruster --- hmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 481be80..a42c5c0 100644 --- a/hmp.c +++ b/hmp.c @@ -535,6 +535,7 @@ out: qapi_free_VncInfo(info); } +#ifdef CONFIG_SPICE void hmp_info_spice(Monitor *mon, const QDict *qdict) { SpiceChannelList *chan; @@ -581,6 +582,7 @@ void hmp_info_spice(Monitor *mon, const QDict *qdict) out: qapi_free_SpiceInfo(info); } +#endif void hmp_info_balloon(Monitor *mon, const QDict *qdict) { -- 1.9.3