aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-01-17 23:59:46 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2022-01-17 23:59:46 +0100
commit8ad2acf352d790d0bdd792b8e126d58a088451f3 (patch)
tree46e69b3e9d5d0c32dde637d8db28fabff404d428
parent12566e7f9b5e5c5d445bc4d36991d134b431dc6c (diff)
downloadbusybox-w32-8ad2acf352d790d0bdd792b8e126d58a088451f3.tar.gz
busybox-w32-8ad2acf352d790d0bdd792b8e126d58a088451f3.tar.bz2
busybox-w32-8ad2acf352d790d0bdd792b8e126d58a088451f3.zip
fix "defined but not used" warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/libarchive/get_header_tar.c2
-rw-r--r--miscutils/i2c_tools.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c
index d26868bf8..cc6f3f0ad 100644
--- a/archival/libarchive/get_header_tar.c
+++ b/archival/libarchive/get_header_tar.c
@@ -147,11 +147,13 @@ static void process_pax_hdr(archive_handle_t *archive_handle, unsigned sz, int g
147#endif 147#endif
148} 148}
149 149
150#if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
150static void die_if_bad_fnamesize(off_t sz) 151static void die_if_bad_fnamesize(off_t sz)
151{ 152{
152 if ((uoff_t)sz > 0xfff) /* more than 4k?! no funny business please */ 153 if ((uoff_t)sz > 0xfff) /* more than 4k?! no funny business please */
153 bb_simple_error_msg_and_die("bad archive"); 154 bb_simple_error_msg_and_die("bad archive");
154} 155}
156#endif
155 157
156char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) 158char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
157{ 159{
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index e3741eeba..da26f5e19 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -120,6 +120,7 @@ static int32_t i2c_smbus_access(int fd, char read_write, uint8_t cmd,
120 return ioctl(fd, I2C_SMBUS, &args); 120 return ioctl(fd, I2C_SMBUS, &args);
121} 121}
122 122
123#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CDETECT
123static int32_t i2c_smbus_read_byte(int fd) 124static int32_t i2c_smbus_read_byte(int fd)
124{ 125{
125 union i2c_smbus_data data; 126 union i2c_smbus_data data;
@@ -131,6 +132,7 @@ static int32_t i2c_smbus_read_byte(int fd)
131 132
132 return data.byte; 133 return data.byte;
133} 134}
135#endif
134 136
135#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP 137#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP
136static int32_t i2c_smbus_write_byte(int fd, uint8_t val) 138static int32_t i2c_smbus_write_byte(int fd, uint8_t val)