selftests/net: fix warnings on reuseaddr_ports_exhausted
Subsystems (3)
PATCH 1/1 selftests/net: fix warnings on reuseaddr_ports_exhausted
Fix multiple warnings seen with gcc 10.2.1:
reuseaddr_ports_exhausted.c:32:41: warning: missing braces around initializer [-Wmissing-braces]
32 | struct reuse_opts unreusable_opts[12] = {
| ^
33 | {0, 0, 0, 0},
| { } { }Fixes 7f204a7de8b0 ("selftests: net: Add SO_REUSEADDR test to check if 4-tuples are fully utilized.")
Signed-off-by Carlos Llamas <[email protected]>
--- .../selftests/net/reuseaddr_ports_exhausted.c | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-)
tools/testing/selftests/net/reuseaddr_ports_exhausted.c +16 -16
@@ -30,25 +30,25 @@ struct reuse_opts { };struct reuse_opts unreusable_opts[12 ] = { - {0 ,0 ,0 ,0 }, - {0 ,0 ,0 ,1 }, - {0 ,0 ,1 ,0 }, - {0 ,0 ,1 ,1 }, - {0 ,1 ,0 ,0 }, - {0 ,1 ,0 ,1 }, - {0 ,1 ,1 ,0 }, - {0 ,1 ,1 ,1 }, - {1 ,0 ,0 ,0 }, - {1 ,0 ,0 ,1 }, - {1 ,0 ,1 ,0 }, - {1 ,0 ,1 ,1 }, + {{0 ,0 }, {0 ,0 }}, + {{0 ,0 }, {0 ,1 }}, + {{0 ,0 }, {1 ,0 }}, + {{0 ,0 }, {1 ,1 }}, + {{0 ,1 }, {0 ,0 }}, + {{0 ,1 }, {0 ,1 }}, + {{0 ,1 }, {1 ,0 }}, + {{0 ,1 }, {1 ,1 }}, + {{1 ,0 }, {0 ,0 }}, + {{1 ,0 }, {0 ,1 }}, + {{1 ,0 }, {1 ,0 }}, + {{1 ,0 }, {1 ,1 }}, };struct reuse_opts reusable_opts[4 ] = { - {1 ,1 ,0 ,0 }, - {1 ,1 ,0 ,1 }, - {1 ,1 ,1 ,0 }, - {1 ,1 ,1 ,1 }, + {{1 ,1 }, {0 ,0 }}, + {{1 ,1 }, {0 ,1 }}, + {{1 ,1 }, {1 ,0 }}, + {{1 ,1 }, {1 ,1 }}, };int bind_port (struct __test_metadata *_metadata,int reuseaddr,int reuseport)
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 8 lines · On Tue, 16 Mar 2021 01:04:29 +0000 you wrote:
Fix multiple warnings seen with gcc 10.2.1:
reuseaddr_ports_exhausted.c:32:41: warning: missing braces around initializer [-Wmissing-braces]32 | struct reuse_opts unreusable_opts[12] = { | ^ 33 | {0, 0, 0, 0}, | { } { }[...]
Here is the summary with links:
- selftests/net: fix warnings on reuseaddr_ports_exhausted
https://git.kernel.org/netdev/net/c/81f711d67a97
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html