Fix clang warning

This commit is contained in:
Victor Zverovich 2016-06-14 15:42:32 -07:00
parent b26e76efe9
commit c9bb5468b6
2 changed files with 3 additions and 2 deletions

View File

@ -1514,7 +1514,8 @@ class ArgVisitor {
*/
Result visit(const Arg &arg) {
switch (arg.type) {
default:
case Arg::NONE:
case Arg::NAMED_ARG:
FMT_ASSERT(false, "invalid argument type");
return Result();
case Arg::INT:

View File

@ -708,7 +708,7 @@ TEST(ArgVisitorTest, VisitUnhandledArg) {
TEST(ArgVisitorTest, VisitInvalidArg) {
Arg arg = Arg();
arg.type = static_cast<Arg::Type>(Arg::CUSTOM + 1);
arg.type = static_cast<Arg::Type>(Arg::NONE);
EXPECT_ASSERT(TestVisitor().visit(arg), "invalid argument type");
}