From: Wolfgang Denk Date: Fri, 11 Sep 2009 09:15:31 +0000 (+0200) Subject: board/esd/cpci750/ide.c: fix compile warning X-Git-Tag: v2010.09-rc1~28^2~7^2~42^2~108 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa8a3446a8945b69abeaa8d662251bdd90f78d24;p=u-boot board/esd/cpci750/ide.c: fix compile warning Fix warning: ide.c:54: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Wolfgang Denk Cc: Matthias Fuchs Cc: Stefan Roese Acked-by: Stefan Roese --- diff --git a/board/esd/cpci750/ide.c b/board/esd/cpci750/ide.c index 638219f65e..a3bd1b73d5 100644 --- a/board/esd/cpci750/ide.c +++ b/board/esd/cpci750/ide.c @@ -48,14 +48,18 @@ int ide_preinit (void) if (devbusfn == -1) devbusfn = pci_find_device (0x1095, 0x3114, 0); if (devbusfn != -1) { + ulong *ide_bus_offset_ptr; + status = 0; + ide_bus_offset_ptr = &ide_bus_offset[0]; pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0, - (u32 *) & ide_bus_offset[0]); + (u32 *)ide_bus_offset_ptr); ide_bus_offset[0] &= 0xfffffffe; ide_bus_offset[0] += CONFIG_SYS_PCI0_IO_SPACE; + ide_bus_offset_ptr = &ide_bus_offset[1]; pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_2, - (u32 *) & ide_bus_offset[1]); + (u32 *)ide_bus_offset_ptr); ide_bus_offset[1] &= 0xfffffffe; ide_bus_offset[1] += CONFIG_SYS_PCI0_IO_SPACE; }