summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2020-11-12 02:12:15 +0300
committerAlexei Starovoitov <ast@kernel.org>2020-11-12 20:13:49 +0300
commitfd63729cc0a6872bdabd393ee933a969642e4076 (patch)
tree6fda60c36d92c62a0c25a0e93c577b6f9ab80917
parentf16e631333a8f12ae8128826e695db4b2a528407 (diff)
downloadlinux-fd63729cc0a6872bdabd393ee933a969642e4076.tar.xz
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: 197afc631413 ("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
-rw-r--r--tools/testing/selftests/bpf/progs/test_subprogs_unused.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_subprogs_unused.c b/tools/testing/selftests/bpf/progs/test_subprogs_unused.c
index 75d975f8cf90..bc49e050d342 100644
--- a/tools/testing/selftests/bpf/progs/test_subprogs_unused.c
+++ b/tools/testing/selftests/bpf/progs/test_subprogs_unused.c
@@ -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;
}