Messages in this thread | | | Subject | Re: [PATCH] bpf: fix unused variable warning | From | Daniel Borkmann <> | Date | Thu, 30 Apr 2020 01:15:27 +0200 |
| |
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[] = { > > Move the definition into the same #ifdef. > > Fixes: f2e10bff16a0 ("bpf: Add support for BPF_OBJ_GET_INFO_BY_FD for bpf_link") > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks!
| |