From: Anatolij Gustschin Date: Thu, 10 Nov 2011 12:21:44 +0000 (+0000) Subject: arch/powerpc/cpu/mpc512x/i2c.c: Fix GCC 4.6 warnings X-Git-Tag: v2011.12-rc1~199 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d14a94bf686bdcee71924c8bbf76ef67b0b4bb0f;p=u-boot arch/powerpc/cpu/mpc512x/i2c.c: Fix GCC 4.6 warnings Fix: i2c.c: In function 'wait_for_bb': i2c.c:81:16: warning: variable 'temp' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin --- diff --git a/arch/powerpc/cpu/mpc512x/i2c.c b/arch/powerpc/cpu/mpc512x/i2c.c index e2d909751e..0ea12806b9 100644 --- a/arch/powerpc/cpu/mpc512x/i2c.c +++ b/arch/powerpc/cpu/mpc512x/i2c.c @@ -78,9 +78,8 @@ static int wait_for_bb (void) status = mpc_reg_in (®s->msr); while (timeout-- && (status & I2C_BB)) { - volatile int temp; mpc_reg_out (®s->mcr, I2C_STA, I2C_STA); - temp = mpc_reg_in (®s->mdr); + (void)mpc_reg_in(®s->mdr); mpc_reg_out (®s->mcr, 0, I2C_STA); mpc_reg_out (®s->mcr, 0, 0); mpc_reg_out (®s->mcr, I2C_EN, 0);