aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2015-07-22 19:53:30 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-07-24 13:57:45 +0200
commitfb4309695905de889d318caec8eb13d3b2c118d5 (patch)
treed7dfdbd0efb960bbcd1aa830067c0b9296e57cfa
parent7d99f4c1b5d12de7644a5bd8c3d46bff05c9ca7c (diff)
vl: Fix compiler warning for builds without VNC
This regression was caused by commit 70b94331. CC vl.o vl.c: In function ‘select_display’: vl.c:2064:12: error: unused variable ‘err’ [-Werror=unused-variable] Error *err = NULL; ^ Reported-by: Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-Id: <1437587610-26433-1-git-send-email-sw@weilnetz.de> Reviewed-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 5856396d46..0adbbd6747 100644
--- a/vl.c
+++ b/vl.c
@@ -2061,7 +2061,6 @@ static void select_vgahw (const char *p)
static DisplayType select_display(const char *p)
{
- Error *err = NULL;
const char *opts;
DisplayType display = DT_DEFAULT;
@@ -2130,6 +2129,7 @@ static DisplayType select_display(const char *p)
} else if (strstart(p, "vnc", &opts)) {
#ifdef CONFIG_VNC
if (*opts == '=') {
+ Error *err = NULL;
if (vnc_parse(opts + 1, &err) == NULL) {
error_report_err(err);
exit(1);