Subject: kern/31105: lkms fail to compile with -W
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dogcow@babymeat.com>
List: netbsd-bugs
Date: 08/31/2005 05:00:01
>Number: 31105
>Category: kern
>Synopsis: lkms fail to compile with -W
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 31 05:00:01 +0000 2005
>Originator: Tom Spindler
>Release: NetBSD 3.99.8
>Organization:
>Environment:
System: NetBSD mercury.babymeat.com 3.99.8 NetBSD 3.99.8 (MERCURY) #2: Sun Aug 21 21:35:36 PDT 2005 dogcow@mercury.babymeat.com:/media/tmp/obj/obj/usr/src/sys/arch/i386/compile/MERCURY i386
Architecture: i386
Machine: i386
>Description:
When compiling lkms with -W, structs cfdata, cfattachlkminit, and cfiattrdata
now emit various errors for various LKMs (sys/lkm/dev/pcmcia/wi_pcmcia among
them.)
>How-To-Repeat:
cd /usr/src/sys/lkm/dev/pcmcia/wi_pcmcia; make -k WARNS=2 USETOOLS=no
[...]
/media/src/src/sys/dev/pcmcia/if_wi_pcmcia.c:102: warning: missing initializer
/media/src/src/sys/dev/pcmcia/if_wi_pcmcia.c:102: warning: (near initialization for `wi_pcmcia_ca.ca_list.le_prev')
wi_pcmcia_lkm.c:10: warning: missing initializer
wi_pcmcia_lkm.c:10: warning: (near initialization for `wi_cd.cd_list.le_prev')
wi_pcmcia_lkm.c:23: warning: missing initializer
wi_pcmcia_lkm.c:23: warning: (near initialization for `wi_pcmcia_cfdata[1].cf_atname')
wi_pcmcia_lkm.c:36: warning: missing initializer
wi_pcmcia_lkm.c:36: warning: (near initialization for `wi_pcmcia_cfattachinit[1].cfai_list')
/media/src/src/sys/dev/pcmcia/if_wi_pcmcia.c:102: warning: missing initializer
/media/src/src/sys/dev/pcmcia/if_wi_pcmcia.c:102: warning: (near initialization for `wi_pcmcia_ca.ca_list.le_prev')
>Fix:
workaround: use WARNS<3 and don't use -W.
>Unformatted: