Skip to content

Commit

Permalink
Merge tag 'fallthrough-fixes-clang-5.10-rc2' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…pub/scm/linux/kernel/git/gustavoars/linux

Pull fallthrough fix from Gustavo A. R. Silva:
 "This fixes a ton of fall-through warnings when building with Clang
  12.0.0 and -Wimplicit-fallthrough"

* tag 'fallthrough-fixes-clang-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
  include: jhash/signal: Fix fall-through warnings for Clang
  • Loading branch information
Linus Torvalds committed Oct 29, 2020
2 parents 934291f + 4169e88 commit 07e0887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/jhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
case 2: a += (u32)k[1]<<8; fallthrough;
case 1: a += k[0];
__jhash_final(a, b, c);
break;
case 0: /* Nothing left to add */
break;
}
Expand Down Expand Up @@ -136,6 +137,7 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
case 2: b += k[1]; fallthrough;
case 1: a += k[0];
__jhash_final(a, b, c);
break;
case 0: /* Nothing left to add */
break;
}
Expand Down
2 changes: 2 additions & 0 deletions include/linux/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ static inline void siginitset(sigset_t *set, unsigned long mask)
memset(&set->sig[1], 0, sizeof(long)*(_NSIG_WORDS-1));
break;
case 2: set->sig[1] = 0;
break;
case 1: ;
}
}
Expand All @@ -250,6 +251,7 @@ static inline void siginitsetinv(sigset_t *set, unsigned long mask)
memset(&set->sig[1], -1, sizeof(long)*(_NSIG_WORDS-1));
break;
case 2: set->sig[1] = -1;
break;
case 1: ;
}
}
Expand Down

0 comments on commit 07e0887

Please sign in to comment.