提交 2b915612 编写于 作者: G Gustavo A. R. Silva 提交者: David S. Miller

gigaset: asyncdata: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced the
" --v-- fall through --v-- " comment with a proper
"fall through", which is what GCC is expecting to find.

Addresses-Coverity-ID: 1364476 ("Missing break in switch")
Addresses-Coverity-ID: 1364477 ("Missing break in switch")
Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a657dbf6
...@@ -65,7 +65,7 @@ static unsigned cmd_loop(unsigned numbytes, struct inbuf_t *inbuf) ...@@ -65,7 +65,7 @@ static unsigned cmd_loop(unsigned numbytes, struct inbuf_t *inbuf)
cs->respdata[0] = 0; cs->respdata[0] = 0;
break; break;
} }
/* --v-- fall through --v-- */ /* fall through */
case '\r': case '\r':
/* end of message line, pass to response handler */ /* end of message line, pass to response handler */
if (cbytes >= MAX_RESP_SIZE) { if (cbytes >= MAX_RESP_SIZE) {
...@@ -100,7 +100,7 @@ static unsigned cmd_loop(unsigned numbytes, struct inbuf_t *inbuf) ...@@ -100,7 +100,7 @@ static unsigned cmd_loop(unsigned numbytes, struct inbuf_t *inbuf)
goto exit; goto exit;
} }
/* quoted or not in DLE mode: treat as regular data */ /* quoted or not in DLE mode: treat as regular data */
/* --v-- fall through --v-- */ /* fall through */
default: default:
/* append to line buffer if possible */ /* append to line buffer if possible */
if (cbytes < MAX_RESP_SIZE) if (cbytes < MAX_RESP_SIZE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册