Skip to content

Commit

Permalink
Fix gcc warning in GetExprArity (#1489)
Browse files Browse the repository at this point in the history
All enumeration values are handled in the switch, but it's still
possible to produce an invalid value, which would not return.
  • Loading branch information
binji authored Jul 18, 2020
1 parent d214642 commit e58b367
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ir-util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ ModuleContext::Arities ModuleContext::GetExprArity(const Expr& expr) const {

case ExprType::Try:
return { 0, cast<TryExpr>(&expr)->block.decl.sig.GetNumResults() };
break;

case ExprType::Ternary:
return { 3, 1 };
Expand Down Expand Up @@ -260,4 +259,6 @@ ModuleContext::Arities ModuleContext::GetExprArity(const Expr& expr) const {
case ExprType::SimdShuffleOp:
return { 2, 1 };
}

WABT_UNREACHABLE;
}

0 comments on commit e58b367

Please sign in to comment.