selftests/bpf: Fix "expression result unused" warnings with icecc
Status from this message: This patch was applied to bpf/bpf.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest1 patch 1 replyApplied 1/1
- v32 patches 3 repliesSuperseded
- v22 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 14 replies | Superseded |
Patches in v4 All 1 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | selftests/bpf: Fix "expression result unused" warnings with icecctools/ tools/ | +4 | 1 reply | Applied |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Yonghong Song |
|---|---|
| 1/1 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next v4 0/1] selftests/bpf: Fix "expression result unused" warnings with icecc
v3: https://lore.kernel.org/bpf/[email protected]/
v3 -> v4: Go back to the original solution (Yonghong, Alexei).
v2: https://lore.kernel.org/bpf/[email protected]/
v2 -> v3: Do not touch libbpf, explain how having two function
declarations works (Andrii).
Fix bpf-gcc build (CI).
v1: https://lore.kernel.org/bpf/[email protected]/
v1 -> v2: Annotate bpf_obj_new_impl() with __must_check (Alexei).
Add an explanation about icecc.
Hi,
I took another look at the "expression result unused" warnings I've been seeing, and it turned out that the root cause was the icecc compiler wrapper and what I consider a clang bug. Back then I've reported that the problem was reproducible with plain clang, but now I see that it was clearly a mixup, sorry about that.
The solution is to add a few awkward (void) casts. I've added a detailed explanation of why they are helpful to the commit message.
Best regards,
Ilya
Ilya Leoshkevich (1):
selftests/bpf: Fix "expression result unused" warnings with icecc
tools/testing/selftests/bpf/progs/bpf_arena_spin_lock.h | 4 ++-- tools/testing/selftests/bpf/progs/linked_list_fail.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
2.51.0