[U-Boot] [PATCH 50/56] common/cmd_i2c.c: Fix GCC 4.6 build warning

Wolfgang Denk wd at denx.de
Sat Nov 5 02:55:54 CET 2011


Fix:
cmd_i2c.c: In function 'do_i2c_add_bus':
cmd_i2c.c:1212:19: warning: variable 'dev' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd at denx.de>
Cc: Heiko Schocher <hs at denx.de>
---
 common/cmd_i2c.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 3ea75f7..a0c5291 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1209,9 +1209,7 @@ static int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
 			device = device->next;
 		}
 	} else {
-		I2C_MUX_DEVICE *dev;
-
-		dev = i2c_mux_ident_muxstring ((uchar *)argv[1]);
+		(void)i2c_mux_ident_muxstring ((uchar *)argv[1]);
 		ret = 0;
 	}
 	return ret;
-- 
1.7.6.4



More information about the U-Boot mailing list