diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-03-14 00:09:18 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-03-16 22:26:49 +0300 |
commit | 4bbb3583687051ef99966ddaeb1730441b777d40 (patch) | |
tree | ee9896e092716aa1b7ea36756f4417102ecc3d12 /tools/bpf/bpftool/map.c | |
parent | dde7b3f5f2f458297aeccfd4783e53ab8ca046db (diff) | |
download | linux-4bbb3583687051ef99966ddaeb1730441b777d40.tar.xz |
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
Diffstat (limited to 'tools/bpf/bpftool/map.c')
-rw-r--r-- | tools/bpf/bpftool/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index b400364ee054..09ae0381205b 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@ -100,7 +100,7 @@ static int do_dump_btf(const struct btf_dumper *d, void *value) { __u32 value_id; - int ret; + int ret = 0; /* start of key-value pair */ jsonw_start_object(d->jw); |