[rtems commit] treewide: Use fallthrough pseudo-keyword

Sebastian Huber sebh at rtems.org
Mon Jun 20 11:21:54 UTC 2022


Module:    rtems
Branch:    master
Commit:    413a00db20ff45d4212f099440927cebfe706cff
Changeset: http://git.rtems.org/rtems/commit/?id=413a00db20ff45d4212f099440927cebfe706cff

Author:    Gustavo A. R. Silva <gustavoars at kernel.org>
Date:      Sun Aug 23 17:36:59 2020 -0500

treewide: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars at kernel.org>

---

 cpukit/libfs/src/jffs2/src/readinode.c          | 2 +-
 cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/libfs/src/jffs2/src/readinode.c b/cpukit/libfs/src/jffs2/src/readinode.c
index c4e32ead47..831fb8f3f9 100644
--- a/cpukit/libfs/src/jffs2/src/readinode.c
+++ b/cpukit/libfs/src/jffs2/src/readinode.c
@@ -1294,7 +1294,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
 			dbg_readinode("symlink's target '%s' cached\n", f->target);
 		}
 
-		/* fall through... */
+		fallthrough;
 
 	case S_IFBLK:
 	case S_IFCHR:
diff --git a/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h b/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h
index 1017a71c1f..56395e1528 100644
--- a/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h
+++ b/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h
@@ -33,3 +33,4 @@
 
 #define __ECOS 1
 #define KBUILD_MODNAME "JFFS2"
+#define fallthrough __attribute__((__fallthrough__))



More information about the vc mailing list