Skip to content

Commit

Permalink
src: add default: case to silence compiler warning
Browse files Browse the repository at this point in the history
This fails compilation on at least one platform because there is no
`default:` case, despite all currently possible enum values being
listed.

Fix that by adding a default message that won’t be used unless V8
introduces new enum values.

Refs: c7eeef5#commitcomment-39228519

PR-URL: #33451
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
addaleax authored and richardlau committed May 18, 2020
1 parent ef1eb8d commit 0e5b975
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static void AtomicsWaitCallback(Isolate::AtomicsWaitEvent event,
void* data) {
Environment* env = static_cast<Environment*>(data);

const char* message;
const char* message = "(unknown event)";
switch (event) {
#define V(key, msg) \
case Isolate::AtomicsWaitEvent::key: \
Expand Down

0 comments on commit 0e5b975

Please sign in to comment.