Skip to content

Commit

Permalink
Resolve two switch related warnings on GCC 8 (#255)
Browse files Browse the repository at this point in the history
* Add default case to resolve -Werror=switch-default.

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

* Fix coverage
  • Loading branch information
andrew-hardin authored and henryiii committed Mar 22, 2019
1 parent 80420d6 commit 6be9f0c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/CLI/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,12 @@ class App {
if(retval && positionals_at_end_) {
positional_only = true;
}
break;

// LCOV_EXCL_START
default:
HorribleError("unrecognized classifier (you should not see this!)");
// LCOV_EXCL_END
}
return retval;
}
Expand Down Expand Up @@ -2396,6 +2402,9 @@ class App {
if(!detail::split_windows_style(current, arg_name, value))
throw HorribleError("windows option parsed but missing! You should not see this");
break;
case detail::Classifier::SUBCOMMAND:
case detail::Classifier::POSITIONAL_MARK:
case detail::Classifier::NONE:
default:
throw HorribleError("parsing got called with invalid option! You should not see this");
}
Expand Down

0 comments on commit 6be9f0c

Please sign in to comment.