(no subject)
Hi,
the EVB64260, P3G4, and ZUMA boards produce a lot of compiler warnings:
mpsc.c: In function 'mpsc_putchar_early':
mpsc.c:121: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:127: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'mpsc_getchar':
mpsc.c:204: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:207: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'mpsc_init':
mpsc.c:273: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:274: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galbrg_set_baudrate':
mpsc.c:402: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galbrg_set_CDV':
mpsc.c:416: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:419: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galbrg_enable':
mpsc.c:429: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:431: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galbrg_disable':
mpsc.c:441: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:443: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galbrg_set_clksrc':
mpsc.c:453: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:456: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_connect':
mpsc.c:585: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:599: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_route_rx_clock':
mpsc.c:630: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:637: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_route_tx_clock':
mpsc.c:647: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:654: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_config_channel_regs':
mpsc.c:685: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:686: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_set_brkcnt':
mpsc.c:707: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:710: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_set_tcschar':
mpsc.c:720: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:723: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_set_char_length':
mpsc.c:733: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:736: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_set_stop_bit_length':
mpsc.c:746: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:748: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_set_parity':
mpsc.c:758: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:767: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_enter_hunt':
mpsc.c:777: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:779: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c: In function 'galmpsc_shutdown':
mpsc.c:809: warning: dereferencing type-punned pointer will break strict-aliasing rules
Are you still maintaining these boards?
If yes, can you please submit a patch to clean this up?
If no, can you please give your OK so we remove these board configurations from the code base?
Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
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 "In the face of entropy and nothingness, you kind of have to pretend it's not there if you want to keep writing good code." - Karl Lehenbauer
PATCH 1/1 Fix compiler warnings for EVB64260, P3G4 and ZUMA
Fix following warnings:
$ ./MAKEALL EVB64260 P3G4 ZUMA Configuring for EVB64260 board... mpsc.c: In function 'mpsc_putchar_early': mpsc.c:121: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:127: warning: dereferencing type-punned pointer will break strict-aliasing rules ...
--- board/evb64260/mpsc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/evb64260/mpsc.c +1 -1
@@ -88,7 +88,7 @@ static void galsdma_enable_rx(void);/* GT64240A errata: cant read MPSC/BRG registers... so make mirrors in ram for read/modify write */ -#define MIRROR_HACK ((struct _tag_mirror_hack *)&(gd->mirror_hack)) +#define MIRROR_HACK ((struct _tag_mirror_hack *)&(gd->mirror_hack[0]))#define GT_REG_WRITE_MIRROR_G (a,d) {MIRROR_HACK->a ## _M = d; GT_REG_WRITE(a,d);}#define GTREGREAD_MIRROR_G (a) (MIRROR_HACK->a ## _M)
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH 1/1 Fix compiler warnings for EVB64260, P3G4 and ZUMA
Dear Anatolij Gustschin,
Quoted 9 lines · In message <[email protected]> you wrote:
Fix following warnings:
$ ./MAKEALL EVB64260 P3G4 ZUMA Configuring for EVB64260 board... mpsc.c: In function 'mpsc_putchar_early': mpsc.c:121: warning: dereferencing type-punned pointer will break strict-aliasing rules mpsc.c:127: warning: dereferencing type-punned pointer will break strict-aliasing rules ...
Quoted 4 lines
Signed-off-by Anatolij Gustschin <[email protected]>--- board/evb64260/mpsc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks a lot!
Best regards,
Wolfgang Denk
Signature · 4 lines
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 Of course there's no reason for it, it's just our policy.