mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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: 197afc6314
("libbpf: Don't attempt to load unused subprog as an entry-point BPF program")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201111231215.1779147-1-andrii@kernel.org
This commit is contained in:
parent
f16e631333
commit
fd63729cc0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user