* [U-Boot] [PATCH] board/eltec/elppc/misc.c: Fix GCC 4.6 build warning
@ 2011-12-20 17:51 Anatolij Gustschin
2011-12-20 18:21 ` Mike Frysinger
2011-12-20 22:21 ` Wolfgang Denk
0 siblings, 2 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2011-12-20 17:51 UTC (permalink / raw)
To: u-boot
Fix:
misc.c: In function 'misc_init_r':
misc.c:119:3: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
board/eltec/elppc/misc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/eltec/elppc/misc.c b/board/eltec/elppc/misc.c
index d476cd5..89f1b1d 100644
--- a/board/eltec/elppc/misc.c
+++ b/board/eltec/elppc/misc.c
@@ -116,7 +116,7 @@ int misc_init_r (void)
eerev.etheraddr[5] = 0x4D;
/* cache config word for ELPPC */
- *(int *) &eerev.res[0] = 0;
+ memset(&eerev.res[0], 0, 4);
initSrom = 1; /* force dialog */
copyNv = 1; /* copy to nvram */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] board/eltec/elppc/misc.c: Fix GCC 4.6 build warning
2011-12-20 17:51 [U-Boot] [PATCH] board/eltec/elppc/misc.c: Fix GCC 4.6 build warning Anatolij Gustschin
@ 2011-12-20 18:21 ` Mike Frysinger
2011-12-20 22:21 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2011-12-20 18:21 UTC (permalink / raw)
To: u-boot
On Tuesday 20 December 2011 12:51:09 Anatolij Gustschin wrote:
> - *(int *) &eerev.res[0] = 0;
> + memset(&eerev.res[0], 0, 4);
&foo[0] is the same thing as foo
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111220/454ce581/attachment.pgp>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] board/eltec/elppc/misc.c: Fix GCC 4.6 build warning
2011-12-20 17:51 [U-Boot] [PATCH] board/eltec/elppc/misc.c: Fix GCC 4.6 build warning Anatolij Gustschin
2011-12-20 18:21 ` Mike Frysinger
@ 2011-12-20 22:21 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2011-12-20 22:21 UTC (permalink / raw)
To: u-boot
Dear Anatolij Gustschin,
In message <1324403469-3085-1-git-send-email-agust@denx.de> you wrote:
> Fix:
> misc.c: In function 'misc_init_r':
> misc.c:119:3: warning: dereferencing type-punned pointer
> will break strict-aliasing rules [-Wstrict-aliasing]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> board/eltec/elppc/misc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Peace was the way.
-- Kirk, "The City on the Edge of Forever", stardate unknown
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-20 22:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 17:51 [U-Boot] [PATCH] board/eltec/elppc/misc.c: Fix GCC 4.6 build warning Anatolij Gustschin
2011-12-20 18:21 ` Mike Frysinger
2011-12-20 22:21 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox