From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60671 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2OJD-000631-LM for qemu-devel@nongnu.org; Wed, 23 Mar 2011 09:41:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2OJ3-0005fJ-GR for qemu-devel@nongnu.org; Wed, 23 Mar 2011 09:41:02 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2OJ3-0005fD-7b for qemu-devel@nongnu.org; Wed, 23 Mar 2011 09:41:01 -0400 From: Peter Maydell Date: Wed, 23 Mar 2011 13:40:57 +0000 Message-Id: <1300887657-9634-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] vl.c: Fix compilation failure if CONFIG_SDL isn't defined List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jes Sorensen , patches@linaro.org Fix a compilation failure if CONFIG_SDL isn't defined (gcc complained that the label 'invalid_display' wasn't used). Signed-off-by: Peter Maydell --- vl.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index dbb927d..c387f2b 100644 --- a/vl.c +++ b/vl.c @@ -1575,7 +1575,7 @@ static DisplayType select_display(const char *p) } else if (strstart(opts, "off", &nextopt)) { no_frame = 1; } else { - goto invalid_display; + goto invalid_sdl_args; } } else if (strstart(opts, ",alt_grab=", &nextopt)) { opts = nextopt; @@ -1584,7 +1584,7 @@ static DisplayType select_display(const char *p) } else if (strstart(opts, "off", &nextopt)) { alt_grab = 0; } else { - goto invalid_display; + goto invalid_sdl_args; } } else if (strstart(opts, ",ctrl_grab=", &nextopt)) { opts = nextopt; @@ -1593,7 +1593,7 @@ static DisplayType select_display(const char *p) } else if (strstart(opts, "off", &nextopt)) { ctrl_grab = 0; } else { - goto invalid_display; + goto invalid_sdl_args; } } else if (strstart(opts, ",window_close=", &nextopt)) { opts = nextopt; @@ -1602,10 +1602,12 @@ static DisplayType select_display(const char *p) } else if (strstart(opts, "off", &nextopt)) { no_quit = 1; } else { - goto invalid_display; + goto invalid_sdl_args; } } else { - goto invalid_display; + invalid_sdl_args: + fprintf(stderr, "Invalid SDL option string: %s\n", p); + exit(1); } opts = nextopt; } @@ -1642,7 +1644,6 @@ static DisplayType select_display(const char *p) } else if (strstart(p, "none", &opts)) { display = DT_NONE; } else { - invalid_display: fprintf(stderr, "Unknown display type: %s\n", p); exit(1); } -- 1.7.1