Re: [PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Andrii Nakryiko
On Wed, Apr 29, 2020 at 6:52 PM Yuehaibing wrote: > > On 2020/4/30 9:25, Andrii Nakryiko wrote: > > Some versions of GCC falsely detect that vi might not be initialized. That's > > not true, but let's silence it with NULL initialization. > > > > Title should be fixed 'unused' --> 'uninitialized' ?

Re: [PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Yuehaibing
On 2020/4/30 9:25, Andrii Nakryiko wrote: > Some versions of GCC falsely detect that vi might not be initialized. That's > not true, but let's silence it with NULL initialization. > Title should be fixed 'unused' --> 'uninitialized' ? > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/libb

Re: [PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Yuehaibing
On 2020/4/30 9:25, Andrii Nakryiko wrote: > Some versions of GCC falsely detect that vi might not be initialized. That's > not true, but let's silence it with NULL initialization. > This title seems not appropriate, 'unused' --> 'initialized' ? > Signed-off-by: Andrii Nakryiko > --- > tools/

[PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Andrii Nakryiko
Some versions of GCC falsely detect that vi might not be initialized. That's not true, but let's silence it with NULL initialization. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/b