[PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Arnd Bergmann
The only user of this variable is inside of an #ifdef, causing a warning without CONFIG_INET: net/core/filter.c: In function 'bpf_sock_ops_cb_flags_set': net/core/filter.c:3382:6: error: unused variable 'val' [-Werror=unused-variable] int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS; This adds

Re: [PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Daniel Borkmann
Hi Arnd, On 02/20/2018 10:16 PM, Arnd Bergmann wrote: > The only user of this variable is inside of an #ifdef, causing > a warning without CONFIG_INET: > > net/core/filter.c: In function 'bpf_sock_ops_cb_flags_set': > net/core/filter.c:3382:6: error: unused variable 'val' > [-Werror=unused-v

Re: [PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Arnd Bergmann
On Tue, Feb 20, 2018 at 10:44 PM, Daniel Borkmann wrote: > Hi Arnd, > > On 02/20/2018 10:16 PM, Arnd Bergmann wrote: >> The only user of this variable is inside of an #ifdef, causing >> a warning without CONFIG_INET: >> >> net/core/filter.c: In function 'bpf_sock_ops_cb_flags_set': >> net/core

Re: [PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Daniel Borkmann
On 02/20/2018 11:08 PM, Arnd Bergmann wrote: > On Tue, Feb 20, 2018 at 10:44 PM, Daniel Borkmann > wrote: >> Hi Arnd, >> >> On 02/20/2018 10:16 PM, Arnd Bergmann wrote: >>> The only user of this variable is inside of an #ifdef, causing >>> a warning without CONFIG_INET: >>> >>> net/core/filter.c: