Skip to contentSkip to conversation

tools: mkimage: use /* fallthrough */ as needed

PATCH New Heinrich Schuchardt 3 participants 4 messages May 9, 2020 – May 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: mkimage: use /* fallthrough */ as needed

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

---
 tools/mkimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/mkimage.c +1 -1
index 336376f8d0..5689e5d75f 100644
@@ -211,7 +211,7 @@ static void process_args(int argc, char **argv)
 		case 'f':
 			datafile = optarg;
 			params.auto_its = !strcmp(datafile, "auto");
-			/* no break */
+			/* fallthrough */
 		case 'F':
 			/*
 			 * The flattened image tree (FIT) format

--
2.26.2

#1 lore raw

PATCH 1/1 tools: mkimage: use /* fallthrough */ as needed

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

---
 tools/mkimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/mkimage.c +1 -1
index 336376f8d0..5689e5d75f 100644
@@ -211,7 +211,7 @@ static void process_args(int argc, char **argv)
 		case 'f':
 			datafile = optarg;
 			params.auto_its = !strcmp(datafile, "auto");
-			/* no break */
+			/* fallthrough */
 		case 'F':
 			/*
 			 * The flattened image tree (FIT) format

--
2.26.2

#2 lore raw

PATCH 1/1 tools: mkimage: use /* fallthrough */ as needed

Quoted 22 lines · Heinrich Schuchardt

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

---
 tools/mkimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/mkimage.c +1 -2
index 336376f8d0..5689e5d75f 100644
@@ -211,7 +211,7 @@ static void process_args(int argc, char **argv)
 		case 'f':
 			datafile = optarg;
 			params.auto_its = !strcmp(datafile, "auto");
-			/* no break */
+			/* fallthrough */
 		case 'F':
 			/*
 			 * The flattened image tree (FIT) format
--
Quoted 1 line

2.26.2

Looks good. Fwiw,

Thanks.

#3 lore raw

PATCH 1/1 tools: mkimage: use /* fallthrough */ as needed

In reply to Heinrich Schuchardt
Quoted 4 lines · Heinrich Schuchardt

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

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200515/a66b7655/attachment.sig>