Skip to content

Commit

Permalink
Replace "FALLTHROUGH" with "fall through".
Browse files Browse the repository at this point in the history
GCC 7 does not accept "FALLTHROUGH" as a keyword to omit implicit
fall through warning "fall through" is recognized

Fixes: nodejs#420
PR-URL: nodejs#428
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
Matthias Loy authored and bnoordhuis committed May 30, 2018
1 parent cf69c8e commit 5b76466
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions http_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ parse_url_char(enum state s, const char ch)
return s_dead;
}

/* FALLTHROUGH */
/* fall through */
case s_req_server_start:
case s_req_server:
if (ch == '/') {
Expand Down Expand Up @@ -1379,7 +1379,7 @@ size_t http_parser_execute (http_parser *parser,
break;
}

/* FALLTHROUGH */
/* fall through */

case s_header_value_start:
{
Expand Down Expand Up @@ -1507,7 +1507,7 @@ size_t http_parser_execute (http_parser *parser,
case h_content_length:
if (ch == ' ') break;
h_state = h_content_length_num;
/* FALLTHROUGH */
/* fall through */

case h_content_length_num:
{
Expand Down Expand Up @@ -1779,7 +1779,7 @@ size_t http_parser_execute (http_parser *parser,
case 2:
parser->upgrade = 1;

/* FALLTHROUGH */
/* fall through */
case 1:
parser->flags |= F_SKIPBODY;
break;
Expand Down Expand Up @@ -2177,7 +2177,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
return s_http_host;
}

/* FALLTHROUGH */
/* fall through */
case s_http_host_v6_end:
if (ch == ':') {
return s_http_host_port_start;
Expand All @@ -2190,7 +2190,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
return s_http_host_v6_end;
}

/* FALLTHROUGH */
/* fall through */
case s_http_host_v6_start:
if (IS_HEX(ch) || ch == ':' || ch == '.') {
return s_http_host_v6;
Expand All @@ -2206,7 +2206,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
return s_http_host_v6_end;
}

/* FALLTHROUGH */
/* fall through */
case s_http_host_v6_zone_start:
/* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */
if (IS_ALPHANUM(ch) || ch == '%' || ch == '.' || ch == '-' || ch == '_' ||
Expand Down Expand Up @@ -2356,7 +2356,7 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
case s_req_server_with_at:
found_at = 1;

/* FALLTHROUGH */
/* fall through */
case s_req_server:
uf = UF_HOST;
break;
Expand Down

0 comments on commit 5b76466

Please sign in to comment.