Subject: kern/27163: fwiso.c doesn't compile
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/06/2004 14:59:29
>Number:         27163
>Category:       kern
>Synopsis:       fwiso.c doesn't compile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 06 13:00:01 UTC 2004
>Originator:     Michael van Elst
>Release:        NetBSD 2.0_RC1
                                Michael van Elst
                                "A potential Snark may lurk in every tree."
System: NetBSD pepew 2.0_RC1 NetBSD 2.0_RC1 (PEPEW) #0: Tue Oct 5 15:23:59 CEST 2004 src@pepew:/sys/arch/i386/compile/PEPEW i386
Architecture: i386
Machine: i386

Compiling a kernel from netbsd-2-0 branch that is configured with
firewire devices including fwiso fails with:

#   compile  PEPEW/fwiso.o
cc -ffreestanding -g -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpoint
er-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-in
itialized-in-bss -Di386 -I. -I../../../../arch -I../../../.. -nostdinc -DLKM -DD
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c ../../../../dev/ieee1394/fwiso.c
../../../../dev/ieee1394/fwiso.c: In function `fwiso_set_handler':
../../../../dev/ieee1394/fwiso.c:842: warning: `bufsize' might be used uninitial
ized in this function
*** Error code 1

The corresponding firewire config entries are:

pseudo-device fwiso

fwohci*  at pci? dev ? function ?       # IEEE1394 Open Host Controller
fwohci*  at cardbus? dev ? function ?   # IEEE1394 Open Host Controller
fw*      at fwbus?                      # IP over 1394

# IEEE1394 nodes
fwnode*  at fwbus? idhi ? idlo ?
sbpscsi* at fwnode?
scsibus* at sbpscsi?  

Try to build a custom kernel including the fwiso device.


Index: fwiso.c
RCS file: /cvsroot/src/sys/dev/ieee1394/fwiso.c,v
retrieving revision 1.3
diff -u -r1.3 fwiso.c
--- fwiso.c	14 Jul 2003 15:47:13 -0000	1.3
+++ fwiso.c	6 Oct 2004 12:55:36 -0000
@@ -870,6 +870,8 @@
 		fd->fd_rsv_size = 64;
 		bufsize = 512;
+	default:
+		panic("fwiso_set_handler: invalid fd->fd_mode");
 	s = splbio();