diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-11-01 20:57:34 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-11-01 20:58:03 +0100 |
commit | 2cf459141373d7ade0ba8cf5de83d4ef12b7dc97 (patch) | |
tree | c700813560047ddb3bec2ac45e3cd488dd6d36ab | |
parent | 5ed6989d805535804fcd05ddc777fbae48d21f3a (diff) | |
download | busybox-w32-2cf459141373d7ade0ba8cf5de83d4ef12b7dc97.tar.gz busybox-w32-2cf459141373d7ade0ba8cf5de83d4ef12b7dc97.tar.bz2 busybox-w32-2cf459141373d7ade0ba8cf5de83d4ef12b7dc97.zip |
i2c_tools: suppress "'blen' may be used uninitialized in this function"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/i2c_tools.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index e19d851fe..aa1c7c5cc 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c | |||
@@ -909,7 +909,7 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
909 | unsigned first = 0x00, last = 0xff, opts; | 909 | unsigned first = 0x00, last = 0xff, opts; |
910 | int *block = (int *)bb_common_bufsiz1; | 910 | int *block = (int *)bb_common_bufsiz1; |
911 | char *opt_r_str, *dash; | 911 | char *opt_r_str, *dash; |
912 | int fd, res, blen; | 912 | int fd, res; |
913 | 913 | ||
914 | opt_complementary = "-2:?3"; /* from 2 to 3 args */ | 914 | opt_complementary = "-2:?3"; /* from 2 to 3 args */ |
915 | opts = getopt32(argv, optstr, &opt_r_str); | 915 | opts = getopt32(argv, optstr, &opt_r_str); |
@@ -976,6 +976,8 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
976 | 976 | ||
977 | /* All but word data. */ | 977 | /* All but word data. */ |
978 | if (mode != I2C_SMBUS_WORD_DATA || even) { | 978 | if (mode != I2C_SMBUS_WORD_DATA || even) { |
979 | int blen = 0; | ||
980 | |||
979 | if (mode == I2C_SMBUS_BLOCK_DATA || mode == I2C_SMBUS_I2C_BLOCK_DATA) | 981 | if (mode == I2C_SMBUS_BLOCK_DATA || mode == I2C_SMBUS_I2C_BLOCK_DATA) |
980 | blen = read_block_data(fd, mode, block); | 982 | blen = read_block_data(fd, mode, block); |
981 | 983 | ||