diff mbox series

[1/1] tools: mkimage: use /* fallthrough */ as needed

Message ID 20200509151042.67947-2-xypron.glpk@gmx.de
State Accepted
Commit a29162a11c341f5fa8fc177e22f23898fc96689b
Headers show
Series [1/1] tools: mkimage: use /* fallthrough */ as needed | expand

Commit Message

Heinrich Schuchardt May 9, 2020, 3:10 p.m. UTC
GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 tools/mkimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.26.2

Comments

Punit Agrawal May 12, 2020, 2:12 a.m. UTC | #1
Heinrich Schuchardt <xypron.glpk at gmx.de> writes:

> GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
> Let's use it consistently.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  tools/mkimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/mkimage.c b/tools/mkimage.c
> index 336376f8d0..5689e5d75f 100644
> --- a/tools/mkimage.c
> +++ b/tools/mkimage.c
> @@ -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

Looks good. Fwiw,

    Reviewed-by: Punit Agrawal <punit1.agrawal at toshiba.co.jp>

Thanks.
diff mbox series

Patch

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 336376f8d0..5689e5d75f 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -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