[U-Boot] [PATCH 02/13] drivers/net/at91_emac.c: Fix GCC 4.6 build warnings

Wolfgang Denk wd at denx.de
Sat Dec 10 23:08:11 CET 2011


Dear Wolfgang Denk,

In message <1323429272-26801-3-git-send-email-wd at denx.de> you wrote:
> Fix:
> at91_emac.c: In function 'at91emac_phy_init':
> at91_emac.c:244:20: warning: variable 'duplex' set but not used
> [-Wunused-but-set-variable]
> at91_emac.c:244:13: warning: variable 'speed' set but not used
> [-Wunused-but-set-variable]
> 
> Use new debug_cond() to fix these warnings.  In the result, anumber of
> inconsistent printf() formats are detected:
> 
> at91_emac.c: In function 'at91emac_read':
> at91_emac.c:147:2: warning: format '%x' expects argument of type
> 'unsigned int', but argument 2 has type 'struct at91_emac_t *'
> [-Wformat]
> at91_emac.c: In function 'at91emac_write':
> at91_emac.c:157:2: warning: format '%x' expects argument of type
> 'unsigned int', but argument 2 has type 'struct at91_emac_t *'
> [-Wformat]
> at91_emac.c:157:2: warning: format '%x' expects argument of type
> 'unsigned int', but argument 4 has type 'short unsigned int *'
> [-Wformat]
> at91_emac.c: In function 'at91emac_recv':
> at91_emac.c:451:3: warning: format '%d' expects argument of type
> 'int', but argument 2 has type 'long unsigned int' [-Wformat]
> at91_emac.c:451:3: warning: format '%x' expects argument of type
> 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat]
> 
> Fix these, too.
> 
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> Cc: Jens Scharsig <js_at_ng at scharsoft.de>
> Cc: Andreas Bießmann <andreas.devel at gmail.com>
> Cc: Reinhard Meyer <u-boot at emk-elektronik.de>
> ---
>  drivers/net/at91_emac.c |   42 +++++++++++++++++++++++-------------------
>  1 files changed, 23 insertions(+), 19 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
Boykottiert Microsoft - Kauft Eure Fenster bei OBI!


More information about the U-Boot mailing list