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: [email protected]
          Reporter: [email protected]

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.

Reply via email to