From 8111d0287821a9b2a2faefbf0be1f345dbe93222 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Tue, 29 Oct 2013 08:36:31 +0400 Subject: vl: fix build when configured with no graphic support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following error occurs when building with no graphic output support: vl.c: In function ‘main’: vl.c:2829:19: error: variable ‘ds’ set but not used [-Werror=unused-but-set-variable] DisplayState *ds; ^ cc1: all warnings being treated as errors To reproduce this issue, just run: $ ./configure \ --disable-curses \ --disable-sdl \ --disable-cocoa \ --disable-gtk \ --disable-vnc \ --enable-werror $ make vl.o Signed-off-by: Antony Pavlov Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- vl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 4ad15b808c..b5ec266d5f 100644 --- a/vl.c +++ b/vl.c @@ -4267,6 +4267,7 @@ int main(int argc, char **argv, char **envp) /* init local displays */ switch (display_type) { case DT_NOGRAPHIC: + (void)ds; /* avoid warning if no display is configured */ break; #if defined(CONFIG_CURSES) case DT_CURSES: -- cgit v1.2.1