guideline: Make explicit fallthrough cases

-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler
to tells gcc that this happens intentionally.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2020-08-21 13:45:52 -07:00 committed by Anas Nashif
commit 0aaae4a039
46 changed files with 105 additions and 101 deletions

View file

@ -999,8 +999,7 @@ static void state_collect(const struct shell *shell)
case '4': /* END Button in ESC[n~ mode */
receive_state_change(shell,
SHELL_RECEIVE_TILDE_EXP);
/* fall through */
/* no break */
__fallthrough;
case 'F': /* END Button in VT100 mode */
shell_op_cursor_end_move(shell);
break;
@ -1008,8 +1007,7 @@ static void state_collect(const struct shell *shell)
case '1': /* HOME Button in ESC[n~ mode */
receive_state_change(shell,
SHELL_RECEIVE_TILDE_EXP);
/* fall through */
/* no break */
__fallthrough;
case 'H': /* HOME Button in VT100 mode */
shell_op_cursor_home_move(shell);
break;
@ -1017,8 +1015,7 @@ static void state_collect(const struct shell *shell)
case '2': /* INSERT Button in ESC[n~ mode */
receive_state_change(shell,
SHELL_RECEIVE_TILDE_EXP);
/* fall through */
/* no break */
__fallthrough;
case 'L': {/* INSERT Button in VT100 mode */
bool status = flag_insert_mode_get(shell);
flag_insert_mode_set(shell, !status);