From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] board/esd/cpci750/ide.c: fix compile warning
Date: Fri, 11 Sep 2009 11:18:23 +0200 [thread overview]
Message-ID: <1252660703-15596-7-git-send-email-wd@denx.de> (raw)
In-Reply-To: <1252660703-15596-1-git-send-email-wd@denx.de>
Fix warning: ide.c:54: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Stefan Roese <sr@denx.de>
---
board/esd/cpci750/ide.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/board/esd/cpci750/ide.c b/board/esd/cpci750/ide.c
index 638219f..a3bd1b7 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;
}
--
1.6.0.6
next prev parent reply other threads:[~2009-09-11 9:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 9:18 [U-Boot] [PATCH] kwbimage.c: Fix compile warning when building on 64 bit systems Wolfgang Denk
2009-09-11 9:18 ` [U-Boot] [PATCH] net/bootp.c: fix compile warning Wolfgang Denk
2009-09-14 22:15 ` Wolfgang Denk
2009-09-11 9:18 ` [U-Boot] [PATCH] board/flagadm/flash.c: " Wolfgang Denk
2009-09-11 16:33 ` Scott Wood
2009-09-11 18:10 ` Wolfgang Denk
2009-09-11 18:28 ` Scott Wood
2009-09-14 22:09 ` [U-Boot] [PATCH v2] " Wolfgang Denk
2009-09-18 21:24 ` Wolfgang Denk
2009-09-11 9:18 ` [U-Boot] [PATCH] drivers/net/natsemi.c: " Wolfgang Denk
2009-09-14 22:10 ` Wolfgang Denk
2009-09-11 9:18 ` [U-Boot] [PATCH] sk98lin: fix compile warnings Wolfgang Denk
2009-09-14 22:11 ` Wolfgang Denk
2009-09-11 9:18 ` [U-Boot] [PATCH] board/esd/common/flash.c: Fix compile warning Wolfgang Denk
2009-09-11 11:24 ` Matthias Fuchs
2009-09-11 13:05 ` Stefan Roese
2009-09-14 22:12 ` Wolfgang Denk
2009-09-11 9:18 ` Wolfgang Denk [this message]
2009-09-11 13:10 ` [U-Boot] [PATCH] board/esd/cpci750/ide.c: fix " Stefan Roese
2009-09-14 22:13 ` Wolfgang Denk
2009-09-14 21:33 ` [U-Boot] [PATCH] kwbimage.c: Fix compile warning when building on 64 bit systems Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252660703-15596-7-git-send-email-wd@denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.