[Bug 292811] sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized when passed as a const pointer argument here
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292811] sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized when passed as a const pointer argument here"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292811] sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized when passed as a const pointer argument here"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292811] sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized when passed as a const pointer argument here"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292811] sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized when passed as a const pointer argument here"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 29 Jan 2026 19:14:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292811
Bug ID: 292811
Summary: sys/kern/imgact_elf.c:2722:18: error: variable
'structsize' is uninitialized when passed as a const
pointer argument here
Product: Base System
Version: 16.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: wosch@FreeBSD.org
I tried to run `make buildkernel' with clang21 on macOS. I get the error:
--- imgact_elf.o ---
sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized
when passed as a const pointer argument here
[-Werror,-Wuninitialized-const-pointer]
2722 | sbuf_bcat(sb, &structsize, sizeof(structsize));
clang21 is right, it is not a good idea to copy an uninitialized local int
variable.
--
You are receiving this mail because:
You are the assignee for the bug.