diff mbox

vl: fix build when configured with no graphic support

Message ID 1383021391-3152-1-git-send-email-antonynpavlov@gmail.com
State New
Headers show

Commit Message

Antony Pavlov Oct. 29, 2013, 4:36 a.m. UTC
The following error occurs when building 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 <antonynpavlov@gmail.com>
---
 vl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefan Weil Oct. 29, 2013, 5:19 a.m. UTC | #1
Am 29.10.2013 05:36, schrieb Antony Pavlov:
> The following error occurs when building 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 <antonynpavlov@gmail.com>
> ---
>  vl.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/vl.c b/vl.c
> index b42ac67..8fbf25e 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4269,6 +4269,7 @@ int main(int argc, char **argv, char **envp)
>      /* init local displays */
>      switch (display_type) {
>      case DT_NOGRAPHIC:
> +        (void)ds;
>          break;
>  #if defined(CONFIG_CURSES)
>      case DT_CURSES:

Reviewed-by: Stefan Weil <sw@weilnetz.de>
diff mbox

Patch

diff --git a/vl.c b/vl.c
index b42ac67..8fbf25e 100644
--- a/vl.c
+++ b/vl.c
@@ -4269,6 +4269,7 @@  int main(int argc, char **argv, char **envp)
     /* init local displays */
     switch (display_type) {
     case DT_NOGRAPHIC:
+        (void)ds;
         break;
 #if defined(CONFIG_CURSES)
     case DT_CURSES: