mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: use explicit C++17 fallthrough
This passes the strictest -Wimplicit-fallthrough setting. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
9675863461
commit
7cf0da020a
4 files changed
+6
-6
No files matched your search
@@ -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;
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ class RequestToServer {
|
||||
switch (action_) {
|
||||
case TransportAction::kKill:
|
||||
server->TerminateConnections();
|
||||
// Fallthrough
|
||||
[[fallthrough]];
|
||||
case TransportAction::kStop:
|
||||
server->Stop();
|
||||
break;
|
||||
|
||||
+2
-2
@@ -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:
|
||||
|
||||
+2
-2
@@ -797,7 +797,7 @@ void ZlibContext::DoThreadPoolWork() {
|
||||
break;
|
||||
}
|
||||
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
case 1:
|
||||
if (next_expected_header_byte == nullptr) {
|
||||
break;
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user