]> git.kaiwu.me - nginx.git/commitdiff
Added missing "fall through" comments (ticket #1259).
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 27 Apr 2017 13:57:18 +0000 (16:57 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 27 Apr 2017 13:57:18 +0000 (16:57 +0300)
Found by gcc7 (-Wimplicit-fallthrough).

src/core/ngx_murmurhash.c
src/http/ngx_http_parse.c
src/os/unix/ngx_process.c

index c31e0e03500bde18fc5acb695cc6061b2a681ab6..5ade658dd05f9079dcc68e5b33ec125c8f9485c2 100644 (file)
@@ -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;
index 9f994731611af9bb10cfc52b0a30b39e2ece4dfc..c65f01529c21fff782589aa184ed270d6b709542 100644 (file)
@@ -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;
index 2d37e21d41886b687ae24b0ed4ef00f0541474ad..016c167110ce02d5a8dfcb45524558048c75cd15 100644 (file)
@@ -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";