Skip to content

Commit

Permalink
kernel: debug: Fix unreachable code in gdb_serial_stub()
Browse files Browse the repository at this point in the history
Fix the following warning:

kernel/debug/gdbstub.c:1049:4: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                           fallthrough;
                           ^
   include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough'
   # define fallthrough                    __attribute__((__fallthrough__)

by placing the fallthrough; statement inside ifdeffery.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
  • Loading branch information
GustavoARSilva committed Jul 12, 2021
1 parent 81eb1d1 commit 1adee58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/debug/gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,8 @@ int gdb_serial_stub(struct kgdb_state *ks)
gdb_cmd_detachkill(ks);
return DBG_PASS_EVENT;
}
#endif
fallthrough;
#endif
case 'C': /* Exception passing */
tmp = gdb_cmd_exception_pass(ks);
if (tmp > 0)
Expand Down

0 comments on commit 1adee58

Please sign in to comment.