"John D. Baker" wrote: > On Mon, 31 Oct 2022, John D. Baker wrote: > > > After this change: > > > > https://mail-index.netbsd.org/source-changes/2022/10/26/msg141745.html > > Correction: After THIS change: > > https://mail-index.netbsd.org/source-changes/2022/10/25/msg141682.html > > > The "NET4501" kernel build fails as shown below. This is probably due > > to "-Os" optimization causing GCC to be unable to grok the initialization > > condition for "ctp". > > I had previously only searched for the last time "sys/kern/subr_prf.c" > had changed, but then realized that didn't account for the affected code. > > > Explicitly initializing "ctp = NULL;" after the declaration allows the > > build to complete.
This is an incorrect warning with i386 gcc and -Os only. Other arches (I tried a handful) and i386 with -O2 don't give the warning. I've added the "ctp = NULL;" workaround with a warning. Thanks for the report! Cheers, Simon.
