Skip to content

Commit

Permalink
nios2: signal: Mark expected switch fall-through
Browse files Browse the repository at this point in the history
Mark switch cases where we are expecting to fall through.

Fix the following warning through the use of the new the new
pseudo-keyword fallthrough;

arch/nios2/kernel/signal.c:254:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
  254 |    restart = -2;
      |    ~~~~~~~~^~~~
arch/nios2/kernel/signal.c:255:3: note: here
  255 |   case ERESTARTNOHAND:
      |   ^~~~

Reported-by: Christian Brauner <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Ley Foon Tan <[email protected]>
  • Loading branch information
Ley Foon Tan committed Jun 12, 2020
1 parent 3d77e6a commit 6b57fa4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/nios2/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ static int do_signal(struct pt_regs *regs)
switch (retval) {
case ERESTART_RESTARTBLOCK:
restart = -2;
fallthrough;
case ERESTARTNOHAND:
case ERESTARTSYS:
case ERESTARTNOINTR:
Expand Down

0 comments on commit 6b57fa4

Please sign in to comment.