From patchwork Wed Mar 23 13:40:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 754 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:27 -0000 Delivered-To: patches@linaro.org Received: by 10.220.28.198 with SMTP id n6cs8352vcc; Wed, 23 Mar 2011 06:41:02 -0700 (PDT) Received: by 10.227.153.152 with SMTP id k24mr6478532wbw.3.1300887661574; Wed, 23 Mar 2011 06:41:01 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id s1si15092936wbs.7.2011.03.23.06.41.00 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 06:41:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Q2OIz-0002Vp-Iw; Wed, 23 Mar 2011 13:40:57 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Jes Sorensen Subject: [PATCH] vl.c: Fix compilation failure if CONFIG_SDL isn't defined Date: Wed, 23 Mar 2011 13:40:57 +0000 Message-Id: <1300887657-9634-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.3 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); }