Fix build error when VNC is configured out
commitea73f37062a9012a4f151f47f2427011b18569c8
authorChristophe de Dinechin <dinechin@redhat.com>
Tue, 25 Jun 2019 12:39:05 +0000 (25 14:39 +0200)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 15 Jul 2019 10:26:26 +0000 (15 11:26 +0100)
tree9f9528b84422984d092284a928e85eff30034861
parent298ad7b5a4519d2ae547df46103b2f8d49ca6f95
Fix build error when VNC is configured out

In hmp_change(), the variable hmp_mon is only used
by code under #ifdef CONFIG_VNC. This results in a build
error when VNC is configured out with the default of
treating warnings as errors:

monitor/hmp-cmds.c: In function ‘hmp_change’:
monitor/hmp-cmds.c:1946:17: error: unused variable ‘hmp_mon’ [-Werror=unused-variable]
1946 |     MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
     |                 ^~~~~~~

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Message-Id: <20190625123905.25434-1-dinechin@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
monitor/hmp-cmds.c