recent current kernel compile failure

From: Divacky Roman <xdivac02_at_stud.fit.vutbr.cz>
Date: Thu, 27 Jan 2005 12:39:06 +0100
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
_at__at_ -602,8 +602,8 _at__at_
      * 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);
Received on Thu Jan 27 2005 - 10:39:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:26 UTC