1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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>
This commit is contained in:
Heinrich Schuchardt
2020-05-09 17:12:42 +02:00
committed by Tom Rini
parent a29162a11c
commit b606a6cfa6

View File

@@ -923,7 +923,9 @@ static const char usage_synopsis[] =
/* Helper for getopt case statements */ /* Helper for getopt case statements */
#define case_USAGE_COMMON_FLAGS \ #define case_USAGE_COMMON_FLAGS \
case 'h': usage(NULL); \ case 'h': usage(NULL); \
/* fallthrough */ \
case 'V': util_version(); \ case 'V': util_version(); \
/* fallthrough */ \
case '?': usage("unknown option"); case '?': usage("unknown option");
static const char usage_short_opts[] = static const char usage_short_opts[] =
@@ -1085,6 +1087,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
switch (opt) { switch (opt) {
case_USAGE_COMMON_FLAGS case_USAGE_COMMON_FLAGS
/* fallthrough */
case 'a': case 'a':
disp->show_addr = 1; disp->show_addr = 1;
break; break;
@@ -1096,7 +1099,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
break; break;
case 'C': case 'C':
inc = 0; inc = 0;
/* no break */ /* fallthrough */
case 'c': case 'c':
type = FDT_IS_COMPAT; type = FDT_IS_COMPAT;
break; break;
@@ -1111,7 +1114,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
break; break;
case 'G': case 'G':
inc = 0; inc = 0;
/* no break */ /* fallthrough */
case 'g': case 'g':
type = FDT_ANY_GLOBAL; type = FDT_ANY_GLOBAL;
break; break;
@@ -1129,7 +1132,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
break; break;
case 'N': case 'N':
inc = 0; inc = 0;
/* no break */ /* fallthrough */
case 'n': case 'n':
type = FDT_IS_NODE; type = FDT_IS_NODE;
break; break;
@@ -1148,7 +1151,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[])
break; break;
case 'P': case 'P':
inc = 0; inc = 0;
/* no break */ /* fallthrough */
case 'p': case 'p':
type = FDT_IS_PROP; type = FDT_IS_PROP;
break; break;