Subject: if_sn_nubus compilation error
To: None <port-mac68k@NetBSD.ORG, briggs@puma.macbsd.com>
From: Ken and Masami Nakata <masami@fa2.so-net.or.jp>
List: port-mac68k
Date: 04/22/1997 10:27:40
Hiya,

Yesterday I tried to build a new kernel with a brand-new tree just
supped.  I get the following error:

cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DEXEC_AOUT -DEXEC_SCRIPT -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DLKM -DUCONSOLE -DDDB -DDIAGNOSTIC -DCOMPAT_43 -DCOMPAT_10 -DCOMPAT_11 -DCOMPAT_12 -DFFS -DNFS -DKERNFS -DNULLFS -DMFS -DFDESC -DUMAPFS -DPROCFS -DCD9660 -DUNION -DQUOTA -DNFSSERVER -DFIFO -DINET -DTCP_COMPAT_42 -DGATEWAY -DPPP_BSDCOMP -DPPP_DEFLATE -DPFIL_HOOKS -DM68040 -DM68030 -DM68020 -DFPSP -DFPU_EMULATE -DZS_CONSOLE_ABORT -DDISABLE_EXT_CACHE -DMAXUSERS=16 -D_KERNEL  -Dmc68020 -Dmac68k  -c ../../../../arch/mac68k/dev/if_sn_nubus.c
cc1: warnings being treated as errors
../../../../arch/mac68k/dev/if_sn_nubus.c: In function `sn_nubus_attach':
../../../../arch/mac68k/dev/if_sn_nubus.c:112: warning: `offset' might be used uninitialized in this function
*** Error code 1

Stop.

if_sn_nubus.c is:

/*	$NetBSD: if_sn_nubus.c,v 1.7 1997/04/14 00:44:01 briggs Exp $	*/

It looks like because offset isn't assigned any value in the 'default'
clause of the switch block in sn_nubus_attach().  I just initialized
the variable with 0 in the declaration, but I'm not sure if it's
supposed to be 0 when the card doesn't match either vendor code
(AE_VENDOR_APPLE or AE_VENDOR_DAYNA).

Thanks,

Ken