diff mbox series

[1/3] fs: annotate implicit fall throughs

Message ID 20190114203859.19875-1-malat@debian.org (mailing list archive)
State New, archived
Headers show
Series [1/3] fs: annotate implicit fall throughs | expand

Commit Message

Mathieu Malaterre Jan. 14, 2019, 8:38 p.m. UTC
There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warnings:

  fs/libfs.c:148:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
  fs/libfs.c:150:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 fs/libfs.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/fs/libfs.c b/fs/libfs.c
index 0fb590d79f30..9efb647917e0 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -146,9 +146,11 @@  loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
 	switch (whence) {
 		case 1:
 			offset += file->f_pos;
+			/* fall through */
 		case 0:
 			if (offset >= 0)
 				break;
+			/* fall through */
 		default:
 			return -EINVAL;
 	}