Subject: kern/35364: Kernel compile fails due to code warning on sys/net/if_ethersubr.c
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <yancm@sdf.lonestar.org>
List: netbsd-bugs
Date: 01/06/2007 01:05:00
>Number: 35364
>Category: kern
>Synopsis: Kernel compile fails due to code warning on sys/net/if_ethersubr.c
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 06 01:05:00 +0000 2007
>Originator: Gene ENonymous
>Release: NetBSD 3 (cvs flag -rnetbsd3) stable branch
>Organization:
>Environment:
NetBSD clarity.homeip.net 3.1_STABLE NetBSD 3.1_STABLE (CLARITY) #11: Wed Nov 22 18:35:55 EST 2006 root@clarity.homeip.net:/usr/obj/sys/arch/i386/compile/CLARITY i386
>Description:
For about the last 2-3 weeks, I have been unable to build the kernel from a clean CVS. The fix is aparently trivial - comment or delete line 1034 to eliminate the unused label statement.
The build.sh job fails with:
cat /usr/src/sys/arch/i386/i386/genassym.cf | sh /usr/src/sys/kern/genassym.sh CC=/usr/src/../tools/bin/i386--netbsdelf-gcc /usr/src/../tools/bin/nbmkdep -f assym.dep -- -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Di386 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DNMBCLUSTERS="65568" -DMAXFILES="4096" -DNOFILE="4096" -DLKM -DIPFILTER_LOOKUP -DMAXUSERS=16 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf
# compile CLARITY/if_ethersubr.o
/usr/src/../tools/bin/i386--netbsdelf-gcc -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Di386 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DNMBCLUSTERS=65568 -DMAXFILES=4096 -DNOFILE=4096 -DLKM -DIPFILTER_LOOKUP -DMAXUSERS=16 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c /usr/src/sys/net/if_ethersubr.c
/usr/src/sys/net/if_ethersubr.c: In function `ether_input':
/usr/src/sys/net/if_ethersubr.c:1034: warning: label `dropanyway' defined but not used
*** Failed target: if_ethersubr.o
>How-To-Repeat:
Every time I try to compile my kernel (mostly a tuned i386 GENERIC with raid, ipf and ippool support) this crashes until I delete or comment out the offending line of unused label/unreachable code.
>Fix:
Delete or comment out line 1034 in sys/net/if_ethersubr.c per the compile error.