aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2022-02-02 22:59:13 +0000
committerDaniel Borkmann <[email protected]>2022-02-03 15:32:25 +0000
commita9a8ac592e47ff35363308ad4c66740724132aa3 (patch)
treed7a49a0a49bfe9563cd9df166dee66c47d6e18ff /tools/bpf/bpftool/common.c
parentbpftool: Stop supporting BPF offload-enabled feature probing (diff)
downloadkernel-a9a8ac592e47ff35363308ad4c66740724132aa3.tar.gz
kernel-a9a8ac592e47ff35363308ad4c66740724132aa3.zip
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 <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/common.c')
-rw-r--r--tools/bpf/bpftool/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index 111dff809c7b..606743c6db41 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/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;