Skip to content

Commit 2d9694d

Browse files
committed
default cleanup
1 parent fb017b4 commit 2d9694d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

category/execution/ethereum/trace/call_frame.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ constexpr std::string_view call_kind_to_string(CallType const &type)
4646
return "CREATE2";
4747
case CallType::SELFDESTRUCT:
4848
return "SELFDESTRUCT";
49-
default:
50-
MONAD_ASSERT(false);
5149
}
50+
MONAD_ABORT(); // unreachable
5251
}
5352

5453
MONAD_ANONYMOUS_NAMESPACE_END

category/execution/ethereum/trace/call_tracer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ void CallTracer::on_enter(evmc_message const &msg)
127127
return CallType::CREATE;
128128
case EVMC_CREATE2:
129129
return CallType::CREATE2;
130-
default:
131-
MONAD_ASSERT(false);
130+
case EVMC_EOFCREATE:
131+
MONAD_ABORT(); // unsupported
132132
}
133+
MONAD_ABORT(); // unreachable
133134
}(),
134135
.flags = msg.flags,
135136
.from = from,

category/execution/monad/staking/fuzzer/staking_contract_machine.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ namespace monad::staking::test
681681
case Transition::precompile_get_delegator:
682682
precompile_get_delegator();
683683
break;
684-
default:
685-
MONAD_ABORT();
684+
case Transition::TRANSITION_COUNT:
685+
MONAD_ABORT(); // invalid enum value
686686
}
687687
// Skip `WITHDRAWAL_DELAY` epochs once in a while to allow for
688688
// withdrawal requests become ready in a more natural way than
@@ -721,9 +721,10 @@ namespace monad::staking::test
721721
return "Transition::precompile_external_reward";
722722
case Transition::precompile_get_delegator:
723723
return "Transition::precompile_get_delegator";
724-
default:
725-
MONAD_ABORT();
724+
case Transition::TRANSITION_COUNT:
725+
MONAD_ABORT(); // invalid enum value
726726
}
727+
MONAD_ABORT(); // unreachable
727728
}
728729

729730
template <Traits traits>

category/vm/compiler/ir/x86/emitter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ namespace monad::vm::compiler::native
269269
return "StackOffset";
270270
case Emitter::LocationType::Literal:
271271
return "Literal";
272-
default:
273-
MONAD_VM_ASSERT(false);
274272
}
273+
return ""; // unreachable
275274
}
276275

277276
template <size_t N>

0 commit comments

Comments
 (0)