mtd: mtdchar: Fix fall-through warnings for Clang
PATCH RESEND 1/1 mtd: mtdchar: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
--- drivers/mtd/mtdchar.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/mtdchar.c +1 -0
@@ -983,6 +983,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)if (!mtd_has_oob (mtd))return -EOPNOTSUPP ; mfi->mode = arg; +break ;case MTD_FILE_MODE_NORMAL :break ;
Signature · 1 line
2.27.0
Quoted 6 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel