NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/52752: GENERIC kernel fails build without INET6



>Number:         52752
>Category:       kern
>Synopsis:       GENERIC kernel fails build without INET6
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 22 17:05:00 +0000 2017
>Originator:     scole_mail
>Release:        current
>Organization:
none
>Environment:
NetBSD dstar 7.1.0_PATCH NetBSD 7.1.0_PATCH (GENERIC) #0: Fri Sep  8 20:45:12 PDT 2017  scole@dstar:/home/scole/nbsd/cvs/7_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
If I attempt to build a macppc GENERIC kernel without INET6 (and stf) it will fails with an unused variable
/home/scole/nbsd/cvs/src/sys/net/if_spppsubr.c:4049:15: error: unused variable 'sp' [-Werror=unused-variable]
  struct sppp *sp = cookie;
               ^
It looks like it is caused when KASSERT is not defined:

In if_sppsubr.c:

static void
sppp_ipv6cp_TO(void *cookie)
{
	struct sppp *sp = cookie;

	KASSERT(SPPP_WLOCKED(sp));
}

--- if_spppsubr.o ---
#   compile  GENERIC/if_spppsubr.o
/home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-7.1.0_PATCH-i386/bin/powerpc--netbsd-gcc -mno-strict-align -Wa,-maltivec -msdata=none -msoft-float -ffreestanding -fno-zero-initialized-in-bss -O2 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wreturn-type -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare --sysroot=/home/scole/nbsd/cvs/src/obj/destdir.macppc -Dmacppc=macppc -I. -I/home/scole/nbsd/cvs/src/sys/../common/lib/libx86emu -I/home/scole/nbsd/cvs/src/sys/../common/include -I/home/scole/nbsd/cvs/src/sys/arch -I/home/scole/nbsd/cvs/src/sys -nostdinc -DZS_CONSOLE_ABORT -DCOMPAT_44 -DFORCE_FUNCTION_KEYS -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/home/scole/nbsd/cvs/src/sys/lib/libkern/../../../common/lib/libc/quad -I/home/scole/nbsd/cvs/src/sys/lib/libkern/../../../common/lib/libc/string -I/home/sc
 ole/nbsd/cvs/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string -I/home/scole/nbsd/cvs/src/sys/external/bsd/ipf -I/home/scole/nbsd/cvs/src/sys/external/isc/atheros_hal/dist -I/home/scole/nbsd/cvs/src/sys/external/isc/atheros_hal/ic -c /home/scole/nbsd/cvs/src/sys/net/if_spppsubr.c -o if_spppsubr.o
/home/scole/nbsd/cvs/src/sys/net/if_spppsubr.c: In function 'sppp_ipv6cp_TO':
/home/scole/nbsd/cvs/src/sys/net/if_spppsubr.c:4049:15: error: unused variable 'sp' [-Werror=unused-variable]
  struct sppp *sp = cookie;
>How-To-Repeat:
Build GENERIC kernel without INET6
>Fix:



Home | Main Index | Thread Index | Old Index