From: Matthias Fuchs <matthias.fuchs@esd.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] board/esd/common/flash.c: Fix compile warning
Date: Fri, 11 Sep 2009 13:24:01 +0200 [thread overview]
Message-ID: <200909111324.02096.matthias.fuchs@esd.eu> (raw)
In-Reply-To: <1252660703-15596-6-git-send-email-wd@denx.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
On Friday 11 September 2009 11:18, Wolfgang Denk wrote:
> Fix warning: ../common/flash.c:635: 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/common/flash.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/board/esd/common/flash.c b/board/esd/common/flash.c
> index 3ea053b..38a58fb 100644
> --- a/board/esd/common/flash.c
> +++ b/board/esd/common/flash.c
> @@ -630,9 +630,10 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
> */
> static int write_word (flash_info_t *info, ulong dest, ulong data)
> {
> + ulong *data_ptr = &data;
> volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
> volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
> - volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)&data;
> + volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
> ulong start;
> int flag;
> int i;
next prev parent reply other threads:[~2009-09-11 11:24 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 [this message]
2009-09-11 13:05 ` Stefan Roese
2009-09-14 22:12 ` Wolfgang Denk
2009-09-11 9:18 ` [U-Boot] [PATCH] board/esd/cpci750/ide.c: fix " Wolfgang Denk
2009-09-11 13:10 ` 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=200909111324.02096.matthias.fuchs@esd.eu \
--to=matthias.fuchs@esd.eu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox