diff --git a/proxygen/external/http_parser/http_parser_cpp.cpp b/proxygen/external/http_parser/http_parser_cpp.cpp index bf2c5f716a..6b21a1509f 100644 --- a/proxygen/external/http_parser/http_parser_cpp.cpp +++ b/proxygen/external/http_parser/http_parser_cpp.cpp @@ -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: @@ -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 == ':') { @@ -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 == '.') { @@ -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; diff --git a/proxygen/lib/http/experimental/RFC1867.cpp b/proxygen/lib/http/experimental/RFC1867.cpp index fd8198d84f..7c4c0ed2c8 100644 --- a/proxygen/lib/http/experimental/RFC1867.cpp +++ b/proxygen/lib/http/experimental/RFC1867.cpp @@ -80,7 +80,7 @@ std::unique_ptr RFC1867Codec::onIngress(std::unique_ptr 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) { @@ -117,7 +117,7 @@ std::unique_ptr RFC1867Codec::onIngress(std::unique_ptr data) { headerParser_.onIngress(*dummyBuf); CHECK(!parseError_); state_ = ParserState::HEADERS; - // fall through + [[fallthrough]]; case ParserState::HEADERS: while (!parseError_ && input_.front() &&