From 76dd77df7edbb899716d91856b3ac314414aabd0 Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Tue, 10 Jan 2023 13:52:35 +0100 Subject: [PATCH] net: zperf: Fix potential build warning A variable was defined directly after a label in two case statements, resulting in build warning with certain compilers. Signed-off-by: Robert Lubos --- subsys/net/lib/zperf/zperf_shell.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subsys/net/lib/zperf/zperf_shell.c b/subsys/net/lib/zperf/zperf_shell.c index 019ce54495b..1cb9cf7f8da 100644 --- a/subsys/net/lib/zperf/zperf_shell.c +++ b/subsys/net/lib/zperf/zperf_shell.c @@ -651,7 +651,7 @@ static int shell_cmd_upload(const struct shell *sh, size_t argc, } switch (argv[i][1]) { - case 'S': + case 'S': { int tos = parse_arg(&i, argc, argv); if (tos < 0 || tos > UINT8_MAX) { @@ -663,6 +663,7 @@ static int shell_cmd_upload(const struct shell *sh, size_t argc, param.options.tos = tos; opt_cnt += 2; break; + } case 'a': async = true; @@ -813,7 +814,7 @@ static int shell_cmd_upload2(const struct shell *sh, size_t argc, } switch (argv[i][1]) { - case 'S': + case 'S': { int tos = parse_arg(&i, argc, argv); if (tos < 0 || tos > UINT8_MAX) { @@ -825,6 +826,7 @@ static int shell_cmd_upload2(const struct shell *sh, size_t argc, param.options.tos = tos; opt_cnt += 2; break; + } case 'a': async = true;