From: Wolfgang Denk Date: Sat, 10 Dec 2011 23:08:11 +0100 Subject: [U-Boot] [PATCH 02/13] drivers/net/at91_emac.c: Fix GCC 4.6 build warnings In-Reply-To: <1323429272-26801-3-git-send-email-wd@denx.de> References: <1323429272-26801-1-git-send-email-wd@denx.de> <1323429272-26801-3-git-send-email-wd@denx.de> Message-ID: <20111210220811.01648823C9@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, In message <1323429272-26801-3-git-send-email-wd@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 > Cc: Jens Scharsig > Cc: Andreas Bie?mann > Cc: Reinhard Meyer > --- > 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!