Skip to content
Snippets Groups Projects
Commit 8a05452c authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva
Browse files

lib/cmdline.c: mark expected switch fall-throughs


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

This patch fixes the following warnings:

lib/cmdline.c:137:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/cmdline.c:140:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/cmdline.c:143:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/cmdline.c:146:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/cmdline.c:149:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.

Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
parent 224b44d4
No related branches found
No related tags found
No related merge requests found
...@@ -135,18 +135,23 @@ unsigned long long memparse(const char *ptr, char **retptr) ...@@ -135,18 +135,23 @@ unsigned long long memparse(const char *ptr, char **retptr)
case 'E': case 'E':
case 'e': case 'e':
ret <<= 10; ret <<= 10;
/* fall through */
case 'P': case 'P':
case 'p': case 'p':
ret <<= 10; ret <<= 10;
/* fall through */
case 'T': case 'T':
case 't': case 't':
ret <<= 10; ret <<= 10;
/* fall through */
case 'G': case 'G':
case 'g': case 'g':
ret <<= 10; ret <<= 10;
/* fall through */
case 'M': case 'M':
case 'm': case 'm':
ret <<= 10; ret <<= 10;
/* fall through */
case 'K': case 'K':
case 'k': case 'k':
ret <<= 10; ret <<= 10;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment