[U-Boot] [PATCH 09/12] drivers/i2c/davinci_i2c.c: Fix GCC 4.6 warning

Anatolij Gustschin agust at denx.de
Wed Nov 16 00:21:00 CET 2011


Fix:
davinci_i2c.c: In function 'flush_rx':
davinci_i2c.c:81:6: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust at denx.de>
Cc: Heiko Schocher <hs at denx.de>
---
 drivers/i2c/davinci_i2c.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index 5e3406d..a09dc76 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -78,13 +78,11 @@ static int poll_i2c_irq(int mask)
 
 void flush_rx(void)
 {
-	int	dummy;
-
 	while (1) {
 		if (!(REG(I2C_STAT) & I2C_STAT_RRDY))
 			break;
 
-		dummy = REG(I2C_DRR);
+		(void)REG(I2C_DRR);
 		REG(I2C_STAT) = I2C_STAT_RRDY;
 		udelay(1000);
 	}
-- 
1.7.1



More information about the U-Boot mailing list