From 03882de79b4fb9ebb995507f136e79db425d8377 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 24 Apr 2013 01:40:46 +0300 Subject: BASE: Fixed code flow warnings. CID 1002239 --- base/commandLine.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'base/commandLine.cpp') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index f6d1f1f702..1890513384 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -332,6 +332,10 @@ void registerDefaults() { continue; \ } +// End an option handler +#define END_COMMAND \ + } + Common::String parseCommandLine(Common::StringMap &settings, int argc, const char * const *argv) { const char *s, *s2; @@ -366,27 +370,27 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha bool isLongCmd = (s[0] == '-' && s[1] == '-'); DO_COMMAND('h', "help") - END_OPTION + END_COMMAND DO_COMMAND('v', "version") - END_OPTION + END_COMMAND DO_COMMAND('t', "list-targets") - END_OPTION + END_COMMAND DO_COMMAND('z', "list-games") - END_OPTION + END_COMMAND #ifdef DETECTOR_TESTING_HACK // HACK FIXME TODO: This command is intentionally *not* documented! DO_LONG_COMMAND("test-detector") - END_OPTION + END_COMMAND #endif #ifdef UPGRADE_ALL_TARGETS_HACK // HACK FIXME TODO: This command is intentionally *not* documented! DO_LONG_COMMAND("upgrade-targets") - END_OPTION + END_COMMAND #endif DO_LONG_OPTION("list-saves") @@ -412,7 +416,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha END_OPTION DO_LONG_COMMAND("list-audio-devices") - END_OPTION + END_COMMAND DO_LONG_OPTION_INT("output-rate") END_OPTION @@ -542,7 +546,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha END_OPTION DO_LONG_COMMAND("list-themes") - END_OPTION + END_COMMAND DO_LONG_OPTION("target-md5") END_OPTION -- cgit v1.2.3