chore: fix -Wimplicit-fallthrough

This commit is contained in:
Shelley Vohr 2021-10-11 13:44:47 +02:00
parent fa7a916ef3
commit 5919f80994
No known key found for this signature in database
GPG Key ID: F13993A75599653C
2 changed files with 6 additions and 6 deletions

View File

@ -1891,7 +1891,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater,
rv = NGHTTP2_ERR_HEADER_COMP; rv = NGHTTP2_ERR_HEADER_COMP;
goto fail; goto fail;
} }
/* fall through */ __attribute__((fallthrough));
case NGHTTP2_HD_STATE_INFLATE_START: case NGHTTP2_HD_STATE_INFLATE_START:
case NGHTTP2_HD_STATE_OPCODE: case NGHTTP2_HD_STATE_OPCODE:
if ((*in & 0xe0u) == 0x20u) { if ((*in & 0xe0u) == 0x20u) {
@ -2001,7 +2001,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater,
inflater->left = 0; inflater->left = 0;
inflater->shift = 0; inflater->shift = 0;
DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0); DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0);
/* Fall through */ __attribute__((fallthrough));
case NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN: case NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN:
rfin = 0; rfin = 0;
rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV); rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV);
@ -2085,7 +2085,7 @@ ssize_t nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater,
inflater->left = 0; inflater->left = 0;
inflater->shift = 0; inflater->shift = 0;
DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0); DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0);
/* Fall through */ __attribute__((fallthrough));
case NGHTTP2_HD_STATE_READ_VALUELEN: case NGHTTP2_HD_STATE_READ_VALUELEN:
rfin = 0; rfin = 0;
rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV); rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV);

View File

@ -2644,10 +2644,10 @@ static int session_after_frame_sent1(nghttp2_session *session) {
case NGHTTP2_HCAT_PUSH_RESPONSE: case NGHTTP2_HCAT_PUSH_RESPONSE:
stream->flags = (uint8_t)(stream->flags & ~NGHTTP2_STREAM_FLAG_PUSH); stream->flags = (uint8_t)(stream->flags & ~NGHTTP2_STREAM_FLAG_PUSH);
++session->num_outgoing_streams; ++session->num_outgoing_streams;
/* Fall through */ __attribute__((fallthrough));
case NGHTTP2_HCAT_RESPONSE: case NGHTTP2_HCAT_RESPONSE:
stream->state = NGHTTP2_STREAM_OPENED; stream->state = NGHTTP2_STREAM_OPENED;
/* Fall through */ __attribute__((fallthrough));
case NGHTTP2_HCAT_HEADERS: case NGHTTP2_HCAT_HEADERS:
if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR); nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR);
@ -5456,7 +5456,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
iframe->state = NGHTTP2_IB_READ_HEAD; iframe->state = NGHTTP2_IB_READ_HEAD;
/* Fall through */ __attribute__((fallthrough));
case NGHTTP2_IB_READ_HEAD: { case NGHTTP2_IB_READ_HEAD: {
int on_begin_frame_called = 0; int on_begin_frame_called = 0;