summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-05-09 17:12:42 +0200
committerTom Rini <trini@konsulko.com>2020-05-15 14:47:35 -0400
commitb606a6cfa6d3d606f4cdbd1585f74cec409af661 (patch)
tree31a7c06caf995aa7654d1a3605d531a0b1dc8c43
parenta29162a11c341f5fa8fc177e22f23898fc96689b (diff)
downloadu-boot-b606a6cfa6d3d606f4cdbd1585f74cec409af661.tar.gz
tools: ftdgrep: use /* fallthrough */ as needed
GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled. Let's use it consistently. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--tools/fdtgrep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index 7e168a1e6b..e4112b8f69 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;