提交 fd63729c 编写于 作者: A Andrii Nakryiko 提交者: Alexei Starovoitov

selftests/bpf: Fix unused attribute usage in subprogs_unused test

Correct attribute name is "unused". maybe_unused is a C++17 addition.
This patch fixes compilation warning during selftests compilation.

Fixes: 197afc63 ("libbpf: Don't attempt to load unused subprog as an entry-point BPF program")
Signed-off-by: NAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201111231215.1779147-1-andrii@kernel.org
上级 f16e6313
......@@ -4,12 +4,12 @@
const char LICENSE[] SEC("license") = "GPL";
__attribute__((maybe_unused)) __noinline int unused1(int x)
__attribute__((unused)) __noinline int unused1(int x)
{
return x + 1;
}
static __attribute__((maybe_unused)) __noinline int unused2(int x)
static __attribute__((unused)) __noinline int unused2(int x)
{
return x + 2;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册