Skip to content

Commit f389b2f

Browse files
tniessenjuanarbol
authored andcommitted
src: use explicit C++17 fallthrough
This passes the strictest -Wimplicit-fallthrough setting. PR-URL: #46251 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3acfe9b commit f389b2f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/crypto/crypto_clienthello.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void ClientHelloParser::Parse(const uint8_t* data, size_t avail) {
2929
case kWaiting:
3030
if (!ParseRecordHeader(data, avail))
3131
break;
32-
// Fall through
32+
[[fallthrough]];
3333
case kTLSHeader:
3434
ParseHeader(data, avail);
3535
break;

src/inspector_io.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class RequestToServer {
7474
switch (action_) {
7575
case TransportAction::kKill:
7676
server->TerminateConnections();
77-
// Fallthrough
77+
[[fallthrough]];
7878
case TransportAction::kStop:
7979
server->Stop();
8080
break;

src/node_i18n.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -794,12 +794,12 @@ static int GetColumnWidth(UChar32 codepoint,
794794
return 2;
795795
}
796796
// If ambiguous_as_full_width is false:
797-
// Fall through
797+
[[fallthrough]];
798798
case U_EA_NEUTRAL:
799799
if (u_hasBinaryProperty(codepoint, UCHAR_EMOJI_PRESENTATION)) {
800800
return 2;
801801
}
802-
// Fall through
802+
[[fallthrough]];
803803
case U_EA_HALFWIDTH:
804804
case U_EA_NARROW:
805805
default:

src/node_zlib.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ void ZlibContext::DoThreadPoolWork() {
797797
break;
798798
}
799799

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

820-
// fallthrough
820+
[[fallthrough]];
821821
case INFLATE:
822822
case GUNZIP:
823823
case INFLATERAW:

0 commit comments

Comments
 (0)