Skip to content

Commit

Permalink
kdb: kdb_keyboard: mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
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 code comments with
a proper "fall through" annotation, which is what GCC is expecting
to find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
  • Loading branch information
Gustavo A. R. Silva authored and Daniel Thompson committed Nov 13, 2018
1 parent 9eb62f0 commit 01cb373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/debug/kdb/kdb_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ int kdb_get_kbd_char(void)
case KT_LATIN:
if (isprint(keychar))
break; /* printable characters */
/* drop through */
/* fall through */
case KT_SPEC:
if (keychar == K_ENTER)
break;
/* drop through */
/* fall through */
default:
return -1; /* ignore unprintables */
}
Expand Down

0 comments on commit 01cb373

Please sign in to comment.