guideline: Make explicit fallthrough cases
-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler to tells gcc that this happens intentionally. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
f0ec286759
commit
0aaae4a039
46 changed files with 105 additions and 101 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <net/http_parser_url.h>
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifndef BIT_AT
|
||||
# define BIT_AT(a, i) \
|
||||
|
@ -200,7 +201,7 @@ enum state parse_url_char(enum state s, const char ch)
|
|||
return s_dead;
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
__fallthrough;
|
||||
case s_req_server_start:
|
||||
case s_req_server:
|
||||
if (ch == '/') {
|
||||
|
@ -322,7 +323,7 @@ http_parse_host_char(enum http_host_state s, const char ch)
|
|||
return s_http_host;
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
__fallthrough;
|
||||
case s_http_host_v6_end:
|
||||
if (ch == ':') {
|
||||
return s_http_host_port_start;
|
||||
|
@ -335,7 +336,7 @@ http_parse_host_char(enum http_host_state s, const char ch)
|
|||
return s_http_host_v6_end;
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
__fallthrough;
|
||||
case s_http_host_v6_start:
|
||||
if (IS_HEX(ch) || ch == ':' || ch == '.') {
|
||||
return s_http_host_v6;
|
||||
|
@ -351,7 +352,7 @@ http_parse_host_char(enum http_host_state s, const char ch)
|
|||
return s_http_host_v6_end;
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
__fallthrough;
|
||||
case s_http_host_v6_zone_start:
|
||||
/* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */
|
||||
if (IS_ALPHANUM(ch) || ch == '%' || ch == '.' || ch == '-' ||
|
||||
|
@ -501,8 +502,8 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
|
|||
|
||||
case s_req_server_with_at:
|
||||
found_at = 1;
|
||||
__fallthrough;
|
||||
|
||||
/* FALLTROUGH */
|
||||
case s_req_server:
|
||||
uf = UF_HOST;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue