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 <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information
addaleax authored and codebytere committed May 19, 2020
1 parent 453affe commit e4ad464
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 e4ad464

Please sign in to comment.