aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-02-02 14:59:13 -0800
committerQuentin Monnet <qmonnet+github@qoba.lt>2022-02-07 18:33:45 +0000
commitddbe54d2ae1314727a81b87d19fe3c9e7118ae1a (patch)
tree5e3b774abb77676e7cd230fe39309acc1d5c62cd
parent89c6f1255f627038681d210e4dceff9f0009ad6a (diff)
downloadbpftool-ddbe54d2ae1314727a81b87d19fe3c9e7118ae1a.tar.gz
bpftool: Fix uninit variable compilation warning
Newer GCC complains about capturing the address of unitialized variable. While there is nothing wrong with the code (the variable is filled out by the kernel), initialize the variable anyway to make compiler happy. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/bpf/20220202225916.3313522-4-andrii@kernel.org
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index 111dff8..606743c 100644
--- a/src/common.c
+++ b/src/common.c
@@ -310,7 +310,7 @@ void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd,
{
const char *prog_name = prog_info->name;
const struct btf_type *func_type;
- const struct bpf_func_info finfo;
+ const struct bpf_func_info finfo = {};
struct bpf_prog_info info = {};
__u32 info_len = sizeof(info);
struct btf *prog_btf = NULL;