提交 8111d028 编写于 作者: A Antony Pavlov 提交者: Michael Tokarev

vl: fix build when configured with no graphic support

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: NAntony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 d9570cad
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册