mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
bpf: Silence unused-but-set-variable warning in bpf_for_each_reg_in_vstate_mask
The macro requires callers to pass a stack variable, but not all callbacks use it. Add (void)__stack to suppress the clang W=1 warning. Signed-off-by: Amery Hung <ameryhung@gmail.com> Link: https://lore.kernel.org/r/20260602175204.624401-1-ameryhung@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
04de7bc142
commit
c169a2a5fd
|
|
@ -582,6 +582,7 @@ bpf_get_spilled_stack_arg(int slot, struct bpf_func_state *frame)
|
|||
(void)(__expr); \
|
||||
} \
|
||||
} \
|
||||
(void)__stack; \
|
||||
})
|
||||
|
||||
/* Invoke __expr over regsiters in __vst, setting __state and __reg */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user