Replace "FALLTHROUGH" with "fall through".

GCC 7 does not accept "FALLTHROUGH" as a keyword to omit implicit
fall through warning "fall through" is recognized

Fixes: https://github.com/nodejs/http-parser/issues/420
PR-URL: https://github.com/nodejs/http-parser/pull/428
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
make-http-max-header-size-gyp-configurable
Matthias Loy 7 years ago committed by Ben Noordhuis
parent cf69c8eda9
commit 5b76466c6b

@ -542,7 +542,7 @@ parse_url_char(enum state s, const char ch)
return s_dead; return s_dead;
} }
/* FALLTHROUGH */ /* fall through */
case s_req_server_start: case s_req_server_start:
case s_req_server: case s_req_server:
if (ch == '/') { if (ch == '/') {
@ -1379,7 +1379,7 @@ reexecute:
break; break;
} }
/* FALLTHROUGH */ /* fall through */
case s_header_value_start: case s_header_value_start:
{ {
@ -1507,7 +1507,7 @@ reexecute:
case h_content_length: case h_content_length:
if (ch == ' ') break; if (ch == ' ') break;
h_state = h_content_length_num; h_state = h_content_length_num;
/* FALLTHROUGH */ /* fall through */
case h_content_length_num: case h_content_length_num:
{ {
@ -1779,7 +1779,7 @@ reexecute:
case 2: case 2:
parser->upgrade = 1; parser->upgrade = 1;
/* FALLTHROUGH */ /* fall through */
case 1: case 1:
parser->flags |= F_SKIPBODY; parser->flags |= F_SKIPBODY;
break; break;
@ -2177,7 +2177,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
return s_http_host; return s_http_host;
} }
/* FALLTHROUGH */ /* fall through */
case s_http_host_v6_end: case s_http_host_v6_end:
if (ch == ':') { if (ch == ':') {
return s_http_host_port_start; return s_http_host_port_start;
@ -2190,7 +2190,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
return s_http_host_v6_end; return s_http_host_v6_end;
} }
/* FALLTHROUGH */ /* fall through */
case s_http_host_v6_start: case s_http_host_v6_start:
if (IS_HEX(ch) || ch == ':' || ch == '.') { if (IS_HEX(ch) || ch == ':' || ch == '.') {
return s_http_host_v6; return s_http_host_v6;
@ -2206,7 +2206,7 @@ http_parse_host_char(enum http_host_state s, const char ch) {
return s_http_host_v6_end; return s_http_host_v6_end;
} }
/* FALLTHROUGH */ /* fall through */
case s_http_host_v6_zone_start: case s_http_host_v6_zone_start:
/* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */ /* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */
if (IS_ALPHANUM(ch) || ch == '%' || ch == '.' || ch == '-' || ch == '_' || if (IS_ALPHANUM(ch) || ch == '%' || ch == '.' || ch == '-' || ch == '_' ||
@ -2356,7 +2356,7 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
case s_req_server_with_at: case s_req_server_with_at:
found_at = 1; found_at = 1;
/* FALLTHROUGH */ /* fall through */
case s_req_server: case s_req_server:
uf = UF_HOST; uf = UF_HOST;
break; break;

Loading…
Cancel
Save