Skip to content

Commit

Permalink
Linux 5.3: Fix switch() fall though compiler errors
Browse files Browse the repository at this point in the history
Fix some switch() fall-though compiler errors:

    abd.c:1504:9: error: this statement may fall through

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #9170
  • Loading branch information
tonyhutter authored and behlendorf committed Aug 21, 2019
1 parent f66a1f8 commit a9ebdfd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 6 additions & 3 deletions module/lua/llex.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,12 @@ static int llex (LexState *ls, SemInfo *seminfo) {
if (sep >= 0) {
read_long_string(ls, seminfo, sep);
return TK_STRING;
}
else if (sep == -1) return '[';
else lexerror(ls, "invalid long string delimiter", TK_STRING);
} else if (sep == -1) {
return '[';
} else {
lexerror(ls, "invalid long string delimiter", TK_STRING);
break;
}
}
case '=': {
next(ls);
Expand Down
4 changes: 4 additions & 0 deletions module/zfs/abd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1408,8 +1408,10 @@ abd_raidz_gen_iterate(abd_t **cabds, abd_t *dabd,
switch (parity) {
case 3:
len = MIN(caiters[2].iter_mapsize, len);
/* falls through */
case 2:
len = MIN(caiters[1].iter_mapsize, len);
/* falls through */
case 1:
len = MIN(caiters[0].iter_mapsize, len);
}
Expand Down Expand Up @@ -1499,9 +1501,11 @@ abd_raidz_rec_iterate(abd_t **cabds, abd_t **tabds,
case 3:
len = MIN(xiters[2].iter_mapsize, len);
len = MIN(citers[2].iter_mapsize, len);
/* falls through */
case 2:
len = MIN(xiters[1].iter_mapsize, len);
len = MIN(citers[1].iter_mapsize, len);
/* falls through */
case 1:
len = MIN(xiters[0].iter_mapsize, len);
len = MIN(citers[0].iter_mapsize, len);
Expand Down
1 change: 1 addition & 0 deletions module/zfs/vdev_raidz_math_scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ static const struct {
a.b[6] = mul_lt[a.b[6]]; \
a.b[5] = mul_lt[a.b[5]]; \
a.b[4] = mul_lt[a.b[4]]; \
/* falls through */ \
case 4: \
a.b[3] = mul_lt[a.b[3]]; \
a.b[2] = mul_lt[a.b[2]]; \
Expand Down

0 comments on commit a9ebdfd

Please sign in to comment.