All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] tools: ftdgrep: use /* fallthrough */ as needed
@ 2020-05-09 15:12 Heinrich Schuchardt
  2020-05-10 13:12 ` Masahiro Yamada
  2020-05-15 20:54 ` Tom Rini
  0 siblings, 2 replies; 12+ messages in thread
From: Heinrich Schuchardt @ 2020-05-09 15:12 UTC (permalink / raw)
  To: u-boot

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 tools/fdtgrep.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index 7e168a1e6b..8b4d2765ad 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -923,7 +923,9 @@ static const char usage_synopsis[] =
 /* Helper for getopt case statements */
 #define case_USAGE_COMMON_FLAGS \
 	case 'h': usage(NULL); \
+	/* fallthrough */ \
 	case 'V': util_version(); \
+	/* fallthrough */ \
 	case '?': usage("unknown option");

 static const char usage_short_opts[] =
@@ -1085,6 +1087,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])

 		switch (opt) {
 		case_USAGE_COMMON_FLAGS
+		/* fallthrough */
 		case 'a':
 			disp->show_addr = 1;
 			break;
@@ -1096,7 +1099,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
 			break;
 		case 'C':
 			inc = 0;
-			/* no break */
+			/* fallthrough */
 		case 'c':
 			type = FDT_IS_COMPAT;
 			break;
@@ -1111,7 +1114,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
 			break;
 		case 'G':
 			inc = 0;
-			/* no break */
+			/* fallthrough */
 		case 'g':
 			type = FDT_ANY_GLOBAL;
 			break;
@@ -1129,7 +1132,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
 			break;
 		case 'N':
 			inc = 0;
-			/* no break */
+			/* fallthrough */
 		case 'n':
 			type = FDT_IS_NODE;
 			break;
@@ -1148,7 +1151,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
 			break;
 		case 'P':
 			inc = 0;
-			/* no break */
+			/* fallthrough */
 		case 'p':
 			type = FDT_IS_PROP;
 			break;
--
2.26.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-05-15 20:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 15:12 [PATCH 1/1] tools: ftdgrep: use /* fallthrough */ as needed Heinrich Schuchardt
2020-05-10 13:12 ` Masahiro Yamada
2020-05-11 18:40   ` Tom Rini
2020-05-11 19:08     ` Heinrich Schuchardt
2020-05-13  3:04       ` Tom Rini
2020-05-13 14:42         ` Tom Rini
2020-05-13 16:05           ` Masahiro Yamada
2020-05-13 16:13             ` Tom Rini
2020-05-13 17:27               ` Masahiro Yamada
2020-05-13 18:41                 ` Tom Rini
2020-05-13 21:52                   ` Tom Rini
2020-05-15 20:54 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.