Commit 6be9f0c659a5f91f50a1ac6afa5fc8c9fffe1ead

Authored by Andrew Hardin
Committed by Henry Schreiner
1 parent 80420d62

Resolve two switch related warnings on GCC 8 (#255)

* Add default case to resolve -Werror=switch-default.

* Add missing enumeration values to resolve -Werror=switch-enum.

* Fix coverage
Showing 1 changed file with 9 additions and 0 deletions
include/CLI/App.hpp
@@ -2234,6 +2234,12 @@ class App { @@ -2234,6 +2234,12 @@ class App {
2234 if(retval && positionals_at_end_) { 2234 if(retval && positionals_at_end_) {
2235 positional_only = true; 2235 positional_only = true;
2236 } 2236 }
  2237 + break;
  2238 +
  2239 + // LCOV_EXCL_START
  2240 + default:
  2241 + HorribleError("unrecognized classifier (you should not see this!)");
  2242 + // LCOV_EXCL_END
2237 } 2243 }
2238 return retval; 2244 return retval;
2239 } 2245 }
@@ -2396,6 +2402,9 @@ class App { @@ -2396,6 +2402,9 @@ class App {
2396 if(!detail::split_windows_style(current, arg_name, value)) 2402 if(!detail::split_windows_style(current, arg_name, value))
2397 throw HorribleError("windows option parsed but missing! You should not see this"); 2403 throw HorribleError("windows option parsed but missing! You should not see this");
2398 break; 2404 break;
  2405 + case detail::Classifier::SUBCOMMAND:
  2406 + case detail::Classifier::POSITIONAL_MARK:
  2407 + case detail::Classifier::NONE:
2399 default: 2408 default:
2400 throw HorribleError("parsing got called with invalid option! You should not see this"); 2409 throw HorribleError("parsing got called with invalid option! You should not see this");
2401 } 2410 }