Skip to content

Commit 89963ad

Browse files
sfrothwelltorvalds
authored andcommitted
kernel/compat.c: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch aims to suppress 3 missing-break-in-switch false positives on some architectures. Acked-by: Arnd Bergmann <[email protected]> Cc: Deepa Dinamani <[email protected]> Cc: Gustavo A. R. Silva <[email protected]> Cc: Kees Cook <[email protected]> Cc: Jann Horn <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5ac9433 commit 89963ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/compat.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,11 @@ get_compat_sigset(sigset_t *set, const compat_sigset_t __user *compat)
346346
return -EFAULT;
347347
switch (_NSIG_WORDS) {
348348
case 4: set->sig[3] = v.sig[6] | (((long)v.sig[7]) << 32 );
349+
/* fall through */
349350
case 3: set->sig[2] = v.sig[4] | (((long)v.sig[5]) << 32 );
351+
/* fall through */
350352
case 2: set->sig[1] = v.sig[2] | (((long)v.sig[3]) << 32 );
353+
/* fall through */
351354
case 1: set->sig[0] = v.sig[0] | (((long)v.sig[1]) << 32 );
352355
}
353356
#else

0 commit comments

Comments
 (0)