Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jan 2005 12:39:06 +0100
From:      Divacky Roman <xdivac02@stud.fit.vutbr.cz>
To:        current@freebsd.org
Cc:        scottl@freebsd.org
Subject:   recent current kernel compile failure
Message-ID:  <20050127113906.GA98285@stud.fit.vutbr.cz>

next in thread | raw e-mail | index | archive | help
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);




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050127113906.GA98285>