> > Christoph Egger wrote: > >Module Name: src > >Committed By: cegger > >Date: Sat Jul 4 21:20:57 UTC 2009 > > > >Modified Files: > > src/sys/dev/pci: pci_usrreq.c > > > >Log Message: > >pciioctl(), pci_devioctl(): > >simplify implementations of PCI_IOC_BDF_CFGREAD, PCI_IOC_BDF_CFGWRITE, > >PCI_IOC_CFGREAD, PCI_IOC_CFGWRITE > >No functional changes. > > This fails to compile on several architectures. > > cc1: warnings being treated as errors > /home/builds/ab/HEAD/src/sys/dev/pci/pci_usrreq.c: In function 'pciioctl': > /home/builds/ab/HEAD/src/sys/dev/pci/pci_usrreq.c:77: warning: 'tag' may > be used uninitialized in this function > --- pci_usrreq.o --- > *** [pci_usrreq.o] Error code 1 > > Robert Swindells
Oh, yeah I see the failures on releng autobuilder, too. I thought, gcc is intelligent enough to see the explicit default case. Obviously, not on all platforms. The platform I runtested build fine. A simple - pcitag_t tag; + pcitag_t tag = 0; /* XXX gcc */ doesn't build for me. I will try memset(&tag, 0, sizeof(tag)); in the default case and buildtest several kernel configs for different archs. When this succeeds, I will commit. Christoph