Skip to content

Commit fd63729

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
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: 197afc6 ("libbpf: Don't attempt to load unused subprog as an entry-point BPF program") Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent f16e631 commit fd63729

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/progs/test_subprogs_unused.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
const char LICENSE[] SEC("license") = "GPL";
66

7-
__attribute__((maybe_unused)) __noinline int unused1(int x)
7+
__attribute__((unused)) __noinline int unused1(int x)
88
{
99
return x + 1;
1010
}
1111

12-
static __attribute__((maybe_unused)) __noinline int unused2(int x)
12+
static __attribute__((unused)) __noinline int unused2(int x)
1313
{
1414
return x + 2;
1515
}

0 commit comments

Comments
 (0)