From 5b76466c6b9063e2c5982423962a16f7319c81f8 Mon Sep 17 00:00:00 2001 From: Matthias Loy Date: Mon, 14 May 2018 09:21:19 +0200 Subject: [PATCH] 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 --- http_parser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/http_parser.c b/http_parser.c index 6a9b1b4..db0830a 100644 --- a/http_parser.c +++ b/http_parser.c @@ -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 == '/') { @@ -1379,7 +1379,7 @@ reexecute: break; } - /* FALLTHROUGH */ + /* fall through */ case s_header_value_start: { @@ -1507,7 +1507,7 @@ reexecute: case h_content_length: if (ch == ' ') break; h_state = h_content_length_num; - /* FALLTHROUGH */ + /* fall through */ case h_content_length_num: { @@ -1779,7 +1779,7 @@ reexecute: case 2: parser->upgrade = 1; - /* FALLTHROUGH */ + /* fall through */ case 1: parser->flags |= F_SKIPBODY; break; @@ -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; @@ -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; @@ -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 == '_' || @@ -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;