Skip to contentSkip to conversation

iop480_uart.c: Fix GCC 4.6 build warnings

PATCH New Stefan Roese 2 participants 2 messages Nov 15, 2011 – Nov 16, 2011 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 16/19 iop480_uart.c: Fix GCC 4.6 build warnings

Fix:
iop480_uart.c: In function 'serial_init':
iop480_uart.c:137:16: warning: variable 'val' set but not used [-Wunused-but-set-variable]

---
 arch/powerpc/cpu/ppc4xx/iop480_uart.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/powerpc/cpu/ppc4xx/iop480_uart.c +1 -2
index 0e3423f..027ca30 100644
@@ -134,7 +134,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int serial_init (void)
 {
-	volatile char val;
 	unsigned short br_reg;
 
 	br_reg = ((((CONFIG_CPUCLOCK * 1000000) / 16) / gd->baudrate) - 1);
@@ -149,7 +148,7 @@ int serial_init (void)
 	out_8((u8 *)SPU_BASE + spu_RxCmd, 0xb0);	/* Enable Rx */
 	out_8((u8 *)SPU_BASE + spu_TxCmd, 0x9c);	/* Enable Tx */
 	out_8((u8 *)SPU_BASE + spu_Handshk_rc, 0xff);	/* Clear Handshake */
-	val = in_8((u8 *)SPU_BASE + spu_RxBuff);	/* Dummy read, to clear receiver */
+	in_8((u8 *)SPU_BASE + spu_RxBuff);	/* Dummy read, to clear receiver */
 
 	return (0);
 }
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 16/19 iop480_uart.c: Fix GCC 4.6 build warnings

Dear Stefan Roese,

Quoted 8 lines · In message <[email protected]> you wrote:

Fix:
iop480_uart.c: In function 'serial_init':
iop480_uart.c:137:16: warning: variable 'val' set but not used [-Wunused-but-set-variable]

---
 arch/powerpc/cpu/ppc4xx/iop480_uart.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Applied, 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
The face of war has never changed.  Surely it is more logical to heal
than to kill.
	-- Surak of Vulcan, "The Savage Curtain", stardate 5906.5