* [PATCH] selftests/net: fix warnings on reuseaddr_ports_exhausted
@ 2021-03-16 1:04 Carlos Llamas
2021-03-16 22:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Carlos Llamas @ 2021-03-16 1:04 UTC (permalink / raw
To: willemb, netdev; +Cc: davem, kuba, Carlos Llamas
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 <cmllamas@google.com>
---
.../selftests/net/reuseaddr_ports_exhausted.c | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/tools/testing/selftests/net/reuseaddr_ports_exhausted.c b/tools/testing/selftests/net/reuseaddr_ports_exhausted.c
index 7b01b7c2ec10..066efd30e294 100644
--- a/tools/testing/selftests/net/reuseaddr_ports_exhausted.c
+++ b/tools/testing/selftests/net/reuseaddr_ports_exhausted.c
@@ -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)
--
2.31.0.rc2.261.g7f71774620-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/net: fix warnings on reuseaddr_ports_exhausted
2021-03-16 1:04 [PATCH] selftests/net: fix warnings on reuseaddr_ports_exhausted Carlos Llamas
@ 2021-03-16 22:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-16 22:10 UTC (permalink / raw
To: Carlos Llamas; +Cc: willemb, netdev, davem, kuba
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-16 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-16 1:04 [PATCH] selftests/net: fix warnings on reuseaddr_ports_exhausted Carlos Llamas
2021-03-16 22:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).