From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJGzH-00034P-8r for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJGzD-00044N-8c for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJGzD-000445-1L for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:27 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t157aQEi009350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 02:36:26 -0500 Received: from blackfin.pond.sub.org (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t157aO5v029159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 5 Feb 2015 02:36:25 -0500 From: Markus Armbruster Date: Thu, 5 Feb 2015 08:36:17 +0100 Message-Id: <1423121783-1806-4-git-send-email-armbru@redhat.com> In-Reply-To: <1423121783-1806-1-git-send-email-armbru@redhat.com> References: <1423121783-1806-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL 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 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 Reviewed-by: Eric Blake Reviewed-by: Gerd Hoffmann --- 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