recent current kernel compile failure
Divacky Roman
xdivac02 at stud.fit.vutbr.cz
Thu Jan 27 03:39:15 PST 2005
hi
recent current with CFLAGS=-O2:
../dev/amr/amr_pci.c
/usr/src/sys/modules/amr/../../dev/amr/amr_pci.c: In function `amr_setup_mbox':
/usr/src/sys/modules/amr/../../dev/amr/amr_pci.c:605: warning: dereferencing
type-punned pointer will break strict-aliasing rules
would be nice to have this repaired
roman
p.s. this ugly hack seems to silence the warning
--- /sys/dev/amr/amr_pci.c Mon Jan 24 00:25:41 2005
+++ /root/amr_pci.c Thu Jan 27 12:34:53 2005
@@ -602,8 +602,8 @@
* Allocate the mailbox structure and permanently map it into
* controller-visible space.
*/
- error = bus_dmamem_alloc(sc->amr_mailbox_dmat, (void **)&p, BUS_DMA_NOWAIT,
- &sc->amr_mailbox_dmamap);
+ error = bus_dmamem_alloc(sc->amr_mailbox_dmat, (void **)(void *)&p,
+ BUS_DMA_NOWAIT, &sc->amr_mailbox_dmamap);
if (error) {
device_printf(sc->amr_dev, "can't allocate mailbox memory\n");
return(ENOMEM);
More information about the freebsd-current
mailing list