Re: [PATCH 2/8] int10: warning fix

2011-02-14 Thread Adam Jackson
On Feb 12, 2011, at 5:05 PM, Mark Kettenis wrote:

 From: Adam Jackson a...@redhat.com
 Date: Sun, 23 Jan 2011 23:18:06 -0500
 
 helper_exec.c: In function 'pciCfg1in':
 helper_exec.c:507:4: warning: passing argument 2 of 
 'pci_device_cfg_read_u32' from incompatible pointer type
 /usr/include/pciaccess.h:153:5: note: expected 'uint32_t *' but argument is 
 of type 'CARD32 *'
 
 That fix isn't so obvious to me.  Why is your compiler warning about
 this?  Is it just because you're on a 32-bit system, where CARD32 is
 typedefed as unsigned long, but uint32_t is typedefed as unsigned
 int?

Yeah.  The other way to fix this is to fix CARD32 in Xmd.h, but I suspect that
introduces more warnings everywhere else in the world than it fixes here.

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 2/8] int10: warning fix

2011-01-23 Thread Adam Jackson
helper_exec.c: In function 'pciCfg1in':
helper_exec.c:507:4: warning: passing argument 2 of 'pci_device_cfg_read_u32' 
from incompatible pointer type
/usr/include/pciaccess.h:153:5: note: expected 'uint32_t *' but argument is of 
type 'CARD32 *'

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/int10/helper_exec.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index b9af473..ec84200 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -504,7 +504,7 @@ pciCfg1in(CARD16 addr, CARD32 *val)
 }
 if (addr == 0xCFC) {
pci_device_cfg_read_u32(pci_device_for_cfg_address(PciCfg1Addr),
-   val, PCI_OFFSET(PciCfg1Addr));
+   (uint32_t *)val, PCI_OFFSET(PciCfg1Addr));
if (PRINT_PORT  DEBUG_IO_TRACE())
ErrorF( cfg_inl(%#lx) = %8.8lx\n, PciCfg1Addr, *val);
return 1;
-- 
1.7.3.4

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel