* [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode
@ 2023-12-12 22:53 Andrii Nakryiko
2023-12-13 0:19 ` Yonghong Song
2023-12-13 18:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2023-12-12 22:53 UTC (permalink / raw)
To: bpf, ast, daniel, martin.lau; +Cc: andrii, kernel-team
When compiling BPF selftests with RELEASE=1, we get two new
warnings, which are treated as errors. Fix them.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
tools/testing/selftests/bpf/veristat.c | 2 +-
tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftests/bpf/veristat.c
index 1d418d66e375..244d4996e06e 100644
--- a/tools/testing/selftests/bpf/veristat.c
+++ b/tools/testing/selftests/bpf/veristat.c
@@ -1254,7 +1254,7 @@ static int cmp_join_stat(const struct verif_stats_join *s1,
bool asc, bool abs)
{
const char *str1 = NULL, *str2 = NULL;
- double v1, v2;
+ double v1 = 0.0, v2 = 0.0;
int cmp = 0;
fetch_join_stat_value(s1, id, var, &str1, &v1);
diff --git a/tools/testing/selftests/bpf/xdp_hw_metadata.c b/tools/testing/selftests/bpf/xdp_hw_metadata.c
index 3291625ba4fb..c69c08933fdd 100644
--- a/tools/testing/selftests/bpf/xdp_hw_metadata.c
+++ b/tools/testing/selftests/bpf/xdp_hw_metadata.c
@@ -79,7 +79,7 @@ static int open_xsk(int ifindex, struct xsk *xsk, __u32 queue_id)
.flags = XSK_UMEM__DEFAULT_FLAGS,
.tx_metadata_len = sizeof(struct xsk_tx_metadata),
};
- __u32 idx;
+ __u32 idx = 0;
u64 addr;
int ret;
int i;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode
2023-12-12 22:53 [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode Andrii Nakryiko
@ 2023-12-13 0:19 ` Yonghong Song
2023-12-13 6:43 ` John Fastabend
2023-12-13 18:30 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Yonghong Song @ 2023-12-13 0:19 UTC (permalink / raw)
To: Andrii Nakryiko, bpf, ast, daniel, martin.lau; +Cc: kernel-team
On 12/12/23 2:53 PM, Andrii Nakryiko wrote:
> When compiling BPF selftests with RELEASE=1, we get two new
> warnings, which are treated as errors. Fix them.
>
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode
2023-12-13 0:19 ` Yonghong Song
@ 2023-12-13 6:43 ` John Fastabend
0 siblings, 0 replies; 4+ messages in thread
From: John Fastabend @ 2023-12-13 6:43 UTC (permalink / raw)
To: Yonghong Song, Andrii Nakryiko, bpf, ast, daniel, martin.lau; +Cc: kernel-team
Yonghong Song wrote:
>
> On 12/12/23 2:53 PM, Andrii Nakryiko wrote:
> > When compiling BPF selftests with RELEASE=1, we get two new
> > warnings, which are treated as errors. Fix them.
> >
> > Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
>
> Acked-by: Yonghong Song <yonghong.song@linux.dev>
>
>
Acked-by: John Fastabend <john.fastabend@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode
2023-12-12 22:53 [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode Andrii Nakryiko
2023-12-13 0:19 ` Yonghong Song
@ 2023-12-13 18:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-12-13 18:30 UTC (permalink / raw)
To: Andrii Nakryiko; +Cc: bpf, ast, daniel, martin.lau, kernel-team
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Tue, 12 Dec 2023 14:53:43 -0800 you wrote:
> When compiling BPF selftests with RELEASE=1, we get two new
> warnings, which are treated as errors. Fix them.
>
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
> ---
> tools/testing/selftests/bpf/veristat.c | 2 +-
> tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Here is the summary with links:
- [bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode
https://git.kernel.org/bpf/bpf-next/c/62d9a969f4a9
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] 4+ messages in thread
end of thread, other threads:[~2023-12-13 18:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 22:53 [PATCH bpf-next] selftests/bpf: fix compiler warnings in RELEASE=1 mode Andrii Nakryiko
2023-12-13 0:19 ` Yonghong Song
2023-12-13 6:43 ` John Fastabend
2023-12-13 18:30 ` 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