]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
drivers/net/at91_emac.c: Fix GCC 4.6 build warnings
authorWolfgang Denk <wd@denx.de>
Fri, 9 Dec 2011 11:14:21 +0000 (12:14 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 10 Dec 2011 22:08:02 +0000 (23:08 +0100)
commitf49620665d67e43d92dd4deac2ffc025a7049306
tree48eab246419197d32985e5bbc149fbe013122aee
parent4eaf172e98d651c0c5856290e5b6fd15744c13f2
drivers/net/at91_emac.c: Fix GCC 4.6 build warnings

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@denx.de>
Cc: Jens Scharsig <js_at_ng@scharsoft.de>
Cc: Andreas Bießmann <andreas.devel@gmail.com>
Cc: Reinhard Meyer <u-boot@emk-elektronik.de>
drivers/net/at91_emac.c