aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/recvmsg6_prog.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2023-03-08 21:40:13 -0800
committerAlexei Starovoitov <[email protected]>2023-03-10 08:14:07 -0800
commit713461b895ef958ef444b00cc2d979f3ca3a82e2 (patch)
treee7d389ad2061e40119fa14a6fae656ba2f01da91 /tools/testing/selftests/bpf/progs/recvmsg6_prog.c
parent2498e6231bfd44f8f85afbc838b37441551a4028 (diff)
selftests/bpf: add __sink() macro to fake variable consumption
Add __sink(expr) macro that forces compiler to believe that passed in expression is both read and written. It used a simple embedded asm for this. This is useful in a lot of tests where we assign value to some variable to trigger some action, but later don't read variable, causing compiler to complain (if corresponding compiler warnings are turned on, which we'll do in the next patch). Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/recvmsg6_prog.c')
0 files changed, 0 insertions, 0 deletions