From: Markus Armbruster Date: Tue, 13 Jan 2015 14:46:39 +0000 (+0100) Subject: hmp: Compile hmp_info_spice() only with CONFIG_SPICE X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=206addd58f251666f5b64d43957ddcba465c0ef1;p=qemu.git hmp: Compile hmp_info_spice() only with CONFIG_SPICE 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 --- diff --git a/hmp.c b/hmp.c index 481be8019b..a42c5c07be 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) {