summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2017-04-27 16:57:18 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2017-04-27 16:57:18 +0300
commitb97145ae6c3fa65b59bff5cb08f72e554c558104 (patch)
tree462ff92e79f13b42ba768620535679eaa17c9f73
parentd9700ec65f6de2d6a52fa4e14759d0a27974422a (diff)
downloadnginx-b97145ae6c3fa65b59bff5cb08f72e554c558104.tar.gz
nginx-b97145ae6c3fa65b59bff5cb08f72e554c558104.tar.bz2
Added missing "fall through" comments (ticket #1259).
Found by gcc7 (-Wimplicit-fallthrough).
-rw-r--r--src/core/ngx_murmurhash.c2
-rw-r--r--src/http/ngx_http_parse.c3
-rw-r--r--src/os/unix/ngx_process.c1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/core/ngx_murmurhash.c b/src/core/ngx_murmurhash.c
index c31e0e035..5ade658dd 100644
--- a/src/core/ngx_murmurhash.c
+++ b/src/core/ngx_murmurhash.c
@@ -35,8 +35,10 @@ ngx_murmur_hash2(u_char *data, size_t len)
switch (len) {
case 3:
h ^= data[2] << 16;
+ /* fall through */
case 2:
h ^= data[1] << 8;
+ /* fall through */
case 1:
h ^= data[0];
h *= 0x5bd1e995;
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 9f9947316..c65f01529 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -1390,6 +1390,7 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
goto done;
case '+':
r->plus_in_uri = 1;
+ /* fall through */
default:
state = sw_usual;
*u++ = ch;
@@ -1431,6 +1432,7 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
goto done;
case '+':
r->plus_in_uri = 1;
+ /* fall through */
default:
state = sw_usual;
*u++ = ch;
@@ -1478,6 +1480,7 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
goto done;
case '+':
r->plus_in_uri = 1;
+ /* fall through */
default:
state = sw_usual;
*u++ = ch;
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index 2d37e21d4..016c16711 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -405,6 +405,7 @@ ngx_signal_handler(int signo)
break;
}
ngx_debug_quit = 1;
+ /* fall through */
case ngx_signal_value(NGX_SHUTDOWN_SIGNAL):
ngx_quit = 1;
action = ", shutting down";