Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: use explicit C++17 fallthrough #46251

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/crypto/crypto_clienthello.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void ClientHelloParser::Parse(const uint8_t* data, size_t avail) {
case kWaiting:
if (!ParseRecordHeader(data, avail))
break;
// Fall through
[[fallthrough]];
case kTLSHeader:
ParseHeader(data, avail);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/inspector_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RequestToServer {
switch (action_) {
case TransportAction::kKill:
server->TerminateConnections();
// Fallthrough
[[fallthrough]];
case TransportAction::kStop:
server->Stop();
break;
Expand Down
4 changes: 2 additions & 2 deletions src/node_i18n.cc
Original file line number Diff line number Diff line change
Expand Up @@ -794,12 +794,12 @@ static int GetColumnWidth(UChar32 codepoint,
return 2;
}
// If ambiguous_as_full_width is false:
// Fall through
[[fallthrough]];
case U_EA_NEUTRAL:
if (u_hasBinaryProperty(codepoint, UCHAR_EMOJI_PRESENTATION)) {
return 2;
}
// Fall through
[[fallthrough]];
case U_EA_HALFWIDTH:
case U_EA_NARROW:
default:
Expand Down
4 changes: 2 additions & 2 deletions src/node_zlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ void ZlibContext::DoThreadPoolWork() {
break;
}

// fallthrough
[[fallthrough]];
case 1:
if (next_expected_header_byte == nullptr) {
break;
Expand All @@ -817,7 +817,7 @@ void ZlibContext::DoThreadPoolWork() {
CHECK(0 && "invalid number of gzip magic number bytes read");
}

// fallthrough
[[fallthrough]];
case INFLATE:
case GUNZIP:
case INFLATERAW:
Expand Down