Skip to content

Commit

Permalink
Enable -Wimplicit-fallthrough in proxygen/PACKAGE
Browse files Browse the repository at this point in the history
Summary:
This diff enables the titular warning flag for the directory in question. Further details are in [this workplace post](https://fb.workplace.com/permalink.php?story_fbid=pfbid02XaWNiCVk69r1ghfvDVpujB8Hr9Y61uDvNakxiZFa2jwiPHscVdEQwCBHrmWZSyMRl&id=100051201402394).

This is a low-risk diff. There are **no run-time effects** and the diff has already been observed to compile locally. **If the code compiles, it works; test errors are spurious.**

If the diff does not pass, it will be closed automatically.

Reviewed By: dmm-fb

Differential Revision: D53545477

fbshipit-source-id: 9b4655fc6505e9f43f21251bbd47a84efaeca313
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 25, 2024
1 parent adbc9f1 commit 697c3ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions proxygen/external/http_parser/http_parser_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ parse_url_char(enum state s, const char ch, int strict_flag)
#if __cplusplus
[[fallthrough]];
#else /* __cplusplus */
/* FALLTHROUGH */
__attribute__((fallthrough));
#endif /* __cplusplus */
case s_req_server_start:
case s_req_server:
Expand Down Expand Up @@ -2252,7 +2252,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
#if __cplusplus
[[fallthrough]];
#else /* __cplusplus */
/* FALLTHROUGH */
__attribute__((fallthrough));
#endif /* __cplusplus */
case s_http_host_v6_end:
if (ch == ':') {
Expand All @@ -2269,7 +2269,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
#if __cplusplus
[[fallthrough]];
#else /* __cplusplus */
/* FALLTHROUGH */
__attribute__((fallthrough));
#endif /* __cplusplus */
case s_http_host_v6_start:
if (IS_HEX(ch) || ch == ':' || ch == '.') {
Expand Down Expand Up @@ -2412,7 +2412,7 @@ http_parser_parse_url_options(const char *buf, size_t buflen, int is_connect,
#if __cplusplus
[[fallthrough]];
#else /* __cplusplus */
/* FALLTHROUGH */
__attribute__((fallthrough));
#endif /* __cplusplus */
case s_req_server:
uf = UF_HOST;
Expand Down
4 changes: 2 additions & 2 deletions proxygen/lib/http/experimental/RFC1867.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ std::unique_ptr<IOBuf> RFC1867Codec::onIngress(std::unique_ptr<IOBuf> data) {
input_.trimStart(boundary_.length() - 1);
bytesProcessed_ += boundary_.length() - 1;
state_ = ParserState::HEADERS_START;
// fall through
[[fallthrough]];

case ParserState::HEADERS_START: {
if (input_.chainLength() < 3) {
Expand Down Expand Up @@ -117,7 +117,7 @@ std::unique_ptr<IOBuf> RFC1867Codec::onIngress(std::unique_ptr<IOBuf> data) {
headerParser_.onIngress(*dummyBuf);
CHECK(!parseError_);
state_ = ParserState::HEADERS;
// fall through
[[fallthrough]];

case ParserState::HEADERS:
while (!parseError_ && input_.front() &&
Expand Down

0 comments on commit 697c3ab

Please sign in to comment.