From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Warning in omap3_mmc.c
Date: Sun, 06 Sep 2009 09:55:55 +0200 [thread overview]
Message-ID: <4AA36B0B.2020100@googlemail.com> (raw)
Recent U-Boot head gives (e.g. for omap3_beagle_config)
omap3_mmc.c: In function 'mmc_detect_card':
omap3_mmc.c:279: warning: dereferencing type-punned pointer will break
strict-aliasing rules
omap3_mmc.c:292: warning: dereferencing type-punned pointer will break
strict-aliasing rules
omap3_mmc.c:336: warning: dereferencing type-punned pointer will break
strict-aliasing rules
omap3_mmc.c: In function 'configure_mmc':
omap3_mmc.c:460: warning: dereferencing type-punned pointer will break
strict-aliasing rules
omap3_mmc.c:461: warning: dereferencing type-punned pointer will break
strict-aliasing rules
omap3_mmc.c:462: warning: dereferencing type-punned pointer will break
strict-aliasing rules
omap3_mmc.c:463: warning: dereferencing type-punned pointer will break
strict-aliasing rules
This is from e.g.
279: ocr_recvd = ((mmc_resp_r3 *) resp)->ocr;
336: mmc_card_cur->RCA = ((mmc_resp_r6 *) resp)->newpublishedrca;
with
unsigned int resp[4];
and
typedef struct {
unsigned int ocr;
} mmc_resp_r3;
typedef struct {
unsigned short cardstatus;
unsigned short newpublishedrca;
} mmc_resp_r6;
Any idea how to fix this?
Many thanks
Dirk
next reply other threads:[~2009-09-06 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-06 7:55 Dirk Behme [this message]
2009-09-06 13:17 ` [U-Boot] Warning in omap3_mmc.c Jean-Christophe PLAGNIOL-VILLARD
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=4AA36B0B.2020100@googlemail.com \
--to=dirk.behme@googlemail.com \
--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