bpftool: Fix maybe-uninitialized warnings
authorAndrii Nakryiko <andrii@kernel.org>
Sat, 13 Mar 2021 21:09:18 +0000 (13:09 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 16 Mar 2021 19:26:49 +0000 (12:26 -0700)
commit4bbb3583687051ef99966ddaeb1730441b777d40
treeee9896e092716aa1b7ea36756f4417102ecc3d12
parentdde7b3f5f2f458297aeccfd4783e53ab8ca046db
bpftool: Fix maybe-uninitialized warnings

Somehow when bpftool is compiled in -Og mode, compiler produces new warnings
about possibly uninitialized variables. Fix all the reported problems.

Fixes: 2119f2189df1 ("bpftool: add C output format option to btf dump subcommand")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210313210920.1959628-3-andrii@kernel.org
tools/bpf/bpftool/btf.c
tools/bpf/bpftool/main.c
tools/bpf/bpftool/map.c