src: use explicit C++17 fallthrough · nodejs/node@7cf0da0 · GitHub
Skip to content

Commit 7cf0da0

Browse files
tniessenruyadorno
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 9675863 commit 7cf0da0

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/crypto/crypto_clienthello.cc

Lines changed: 1 addition & 1 deletion

src/inspector_io.cc

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)