Subject: Re: 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: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 01/06/2007 14:30:03
The following reply was made to PR kern/35364; it has been noted by GNATS.

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: kern/35364: Kernel compile fails due to code warning on sys/net/if_ethersubr.c
Date: Sat, 6 Jan 2007 15:27:00 +0100

 On Sat, Jan 06, 2007 at 01:05:00AM +0000, yancm@sdf.lonestar.org wrote:
 > 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.
 
 No, this label is used in some cases. I guess your kernel config file has
 LLC without ISO nor NETATALK, can you confirm ?
 
 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --