From: He Zhe <zhe...@windriver.com>

A compilation -Wimplicit-fallthrough warning was enabled by commit
a035d552a93b ("Makefile: Globally enable fall-through warning")
and triggers the following warning.

fs/aufs/opts.h:78:11:
warning: this statement may fall through [-Wimplicit-fallthrough=]

This patch adds comments according GNU manual.
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options

Signed-off-by: He Zhe <zhe...@windriver.com>
---
 fs/aufs/opts.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c
index d370108..01fae8b 100644
--- a/fs/aufs/opts.c
+++ b/fs/aufs/opts.c
@@ -1499,8 +1499,10 @@ static int au_opt_br(struct super_block *sb, struct 
au_opt *opt,
                if (opt->add.bindex < 0)
                        opt->add.bindex = 0;
                goto add;
+               /* Always goto add, not fallthrough */
        case Opt_prepend:
                opt->add.bindex = 0;
+               /* fallthrough */
        add: /* indented label */
        case Opt_add:
                err = au_br_add(sb, &opt->add,
-- 
2.7.4


Reply via email to