Re: [PATCH] bpf: fix unused variable warning

2020-04-29 Thread Daniel Borkmann
On 4/29/20 3:21 PM, Arnd Bergmann wrote: Hiding the only using of bpf_link_type_strs[] in an #ifdef causes an unused-variable warning: kernel/bpf/syscall.c:2280:20: error: 'bpf_link_type_strs' defined but not used [-Werror=unused-variable] 2280 | static const char *bpf_link_type_strs[] = { M

Re: [PATCH] bpf: fix unused variable warning

2020-04-29 Thread Andrii Nakryiko
On Wed, Apr 29, 2020 at 6:23 AM Arnd Bergmann wrote: > > Hiding the only using of bpf_link_type_strs[] in an #ifdef causes > an unused-variable warning: > > kernel/bpf/syscall.c:2280:20: error: 'bpf_link_type_strs' defined but not > used [-Werror=unused-variable] > 2280 | static const char *bpf_

[PATCH] bpf: fix unused variable warning

2020-04-29 Thread Arnd Bergmann
Hiding the only using of bpf_link_type_strs[] in an #ifdef causes an unused-variable warning: kernel/bpf/syscall.c:2280:20: error: 'bpf_link_type_strs' defined but not used [-Werror=unused-variable] 2280 | static const char *bpf_link_type_strs[] = { Move the definition into the same #ifdef. Fi