linux/tools/lib/bpf
Achill Gilgenast 13cb75730b libbpf: Avoid possible use of uninitialized mod_len
Though mod_len is only read when mod_name != NULL and both are initialized
together, gcc15 produces a warning with -Werror=maybe-uninitialized:

libbpf.c: In function 'find_kernel_btf_id.constprop':
libbpf.c:10100:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized]
10100 |                 if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libbpf.c:10070:21: note: 'mod_len' was declared here
10070 |         int ret, i, mod_len;
      |                     ^~~~~~~

Silence the false positive.

Signed-off-by: Achill Gilgenast <fossdd@pwned.life>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250729094611.2065713-1-fossdd@pwned.life
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-07-31 11:39:46 -07:00
..
.gitignore tools build: Correct bpf fixdep dependencies 2024-08-05 12:19:48 -03:00
bpf.c libbpf: Introduce bpf_prog_stream_read() API 2025-07-03 19:30:07 -07:00
bpf.h libbpf: Introduce bpf_prog_stream_read() API 2025-07-03 19:30:07 -07:00
bpf_core_read.h bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ 2025-05-05 14:20:28 -07:00
bpf_endian.h
bpf_gen_internal.h libbpf: Support creating light skeleton of either endianness 2024-10-03 17:47:36 -07:00
bpf_helpers.h libbpf: __arg_untrusted in bpf_helpers.h 2025-07-07 08:25:07 -07:00
bpf_prog_linfo.c
bpf_tracing.h libbpf: Fix some typos in comments 2024-09-09 16:05:40 -07:00
btf.c libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux correctly 2025-06-06 14:07:07 -07:00
btf.h libbpf: Add support for printing BTF character arrays as strings 2025-06-05 13:45:16 -07:00
btf_dump.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf after rc3 2025-06-26 09:49:39 -07:00
btf_iter.c libbpf,bpf: Share BTF relocate-related code with kernel 2024-06-21 14:45:07 -07:00
btf_relocate.c libbpf: Fix incorrect traversal end type ID when marking BTF_IS_EMBEDDED 2025-01-16 15:34:18 -08:00
Build libbpf: Split field iter code into its own file kernel 2024-06-21 14:45:07 -07:00
elf.c libbpf: Stringify errno in log messages in the remaining code 2024-11-11 20:29:45 -08:00
features.c libbpf: Stringify errno in log messages in the remaining code 2024-11-11 20:29:45 -08:00
gen_loader.c libbpf: Stringify errno in log messages in the remaining code 2024-11-11 20:29:45 -08:00
hashmap.c
hashmap.h libbpf: Fix possible compiler warnings in hashmap 2024-10-11 12:36:59 -07:00
libbpf.c libbpf: Avoid possible use of uninitialized mod_len 2025-07-31 11:39:46 -07:00
libbpf.h libbpf: Support link-based cgroup attach with options 2025-06-09 16:28:30 -07:00
libbpf.map libbpf: start v1.7 dev cycle 2025-07-16 18:37:27 -07:00
libbpf.pc.template
libbpf_common.h
libbpf_errno.c
libbpf_internal.h libbpf: Fix implicit memfd_create() for bionic 2025-04-04 08:52:37 -07:00
libbpf_legacy.h libbpf: Fix some typos in comments 2024-09-09 16:05:40 -07:00
libbpf_probes.c bpf: improve error message for unsupported helper 2024-03-28 18:30:53 -07:00
libbpf_version.h libbpf: start v1.7 dev cycle 2025-07-16 18:37:27 -07:00
linker.c libbpf: Use proper errno value in linker 2025-04-30 09:04:20 -07:00
Makefile tools: Remove redundant quiet setup 2025-02-18 16:27:43 -03:00
netlink.c libbpf: Support creating and destroying qdisc 2025-04-17 10:54:41 -07:00
nlattr.c libbpf: Use proper errno value in nlattr 2025-05-12 15:22:54 -07:00
nlattr.h
relo_core.c libbpf: fix LDX/STX/ST CO-RE relocation size adjustment logic 2025-02-14 19:58:05 -08:00
relo_core.h
ringbuf.c libbpf: Stringify errno in log messages in the remaining code 2024-11-11 20:29:45 -08:00
skel_internal.h libbpf: Support creating light skeleton of either endianness 2024-10-03 17:47:36 -07:00
str_error.c libbpf: Add namespace for errstr making it libbpf_errstr 2025-03-21 13:44:54 -07:00
str_error.h libbpf: Add namespace for errstr making it libbpf_errstr 2025-03-21 13:44:54 -07:00
strset.c
strset.h
usdt.bpf.h libbpf: Implement bpf_usdt_arg_size BPF function 2025-02-26 08:59:44 -08:00
usdt.c libbpf: Correct some typos and syntax issues in usdt doc 2025-06-05 11:45:48 -07:00
zip.c libbpf: Remove unneeded semicolon 2024-10-03 17:47:35 -07:00
zip.h