aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2017-08-01 15:23:41 -0700
committerGravatar GitHub <noreply@github.com>2017-08-01 15:23:41 -0700
commit9279ca126769031ef526efb140d1509efef66599 (patch)
tree508e424411a02d201409b019d5bdb1f82548ff43 /src/core
parent0efb1e940aad8714ed075c6d02d8ee85cc2863b7 (diff)
parentd50e01d041060e32a5fcb0cfd2e100dcb5767ff4 (diff)
Merge pull request #11796 from afirago/fix-fallthrough-werror
Fix implicit fallthrough warning on GCC 7.x
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_decoder.c1
-rw-r--r--src/core/ext/transport/chttp2/transport/varint.c4
-rw-r--r--src/core/lib/json/json_reader.c1
-rw-r--r--src/core/lib/support/murmur_hash.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c
index fe7b7e4a42..5a99cbeffc 100644
--- a/src/core/ext/transport/chttp2/transport/bin_decoder.c
+++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c
@@ -118,6 +118,7 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx) {
switch (input_tail) {
case 3:
ctx->output_cur[1] = COMPOSE_OUTPUT_BYTE_1(ctx->input_cur);
+ /* fallthrough */
case 2:
ctx->output_cur[0] = COMPOSE_OUTPUT_BYTE_0(ctx->input_cur);
}
diff --git a/src/core/ext/transport/chttp2/transport/varint.c b/src/core/ext/transport/chttp2/transport/varint.c
index 5f93a23a94..0d94ddcbc3 100644
--- a/src/core/ext/transport/chttp2/transport/varint.c
+++ b/src/core/ext/transport/chttp2/transport/varint.c
@@ -37,12 +37,16 @@ void grpc_chttp2_hpack_write_varint_tail(uint32_t tail_value, uint8_t* target,
switch (tail_length) {
case 5:
target[4] = (uint8_t)((tail_value >> 28) | 0x80);
+ /* fallthrough */
case 4:
target[3] = (uint8_t)((tail_value >> 21) | 0x80);
+ /* fallthrough */
case 3:
target[2] = (uint8_t)((tail_value >> 14) | 0x80);
+ /* fallthrough */
case 2:
target[1] = (uint8_t)((tail_value >> 7) | 0x80);
+ /* fallthrough */
case 1:
target[0] = (uint8_t)((tail_value) | 0x80);
}
diff --git a/src/core/lib/json/json_reader.c b/src/core/lib/json/json_reader.c
index 75f59e0912..094a35176c 100644
--- a/src/core/lib/json/json_reader.c
+++ b/src/core/lib/json/json_reader.c
@@ -178,6 +178,7 @@ grpc_json_reader_status grpc_json_reader_run(grpc_json_reader *reader) {
json_reader_string_clear(reader);
reader->state = GRPC_JSON_STATE_VALUE_END;
/* The missing break here is intentional. */
+ /* fallthrough */
case GRPC_JSON_STATE_VALUE_END:
case GRPC_JSON_STATE_OBJECT_KEY_BEGIN:
diff --git a/src/core/lib/support/murmur_hash.c b/src/core/lib/support/murmur_hash.c
index f329611818..f06b970de7 100644
--- a/src/core/lib/support/murmur_hash.c
+++ b/src/core/lib/support/murmur_hash.c
@@ -62,8 +62,10 @@ uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed) {
switch (len & 3) {
case 3:
k1 ^= ((uint32_t)tail[2]) << 16;
+ /* fallthrough */
case 2:
k1 ^= ((uint32_t)tail[1]) << 8;
+ /* fallthrough */
case 1:
k1 ^= tail[0];
k1 *= c1;