[git commit] fix "defined but not used" warnings

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 17 22:59:46 UTC 2022


commit: https://git.busybox.net/busybox/commit/?id=8ad2acf352d790d0bdd792b8e126d58a088451f3
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/libarchive/get_header_tar.c | 2 ++
 miscutils/i2c_tools.c                | 2 ++
 2 files changed, 4 insertions(+)

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
 #endif
 }
 
+#if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
 static void die_if_bad_fnamesize(off_t sz)
 {
 	if ((uoff_t)sz > 0xfff) /* more than 4k?! no funny business please */
 		bb_simple_error_msg_and_die("bad archive");
 }
+#endif
 
 char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
 {
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,
 	return ioctl(fd, I2C_SMBUS, &args);
 }
 
+#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CDETECT
 static int32_t i2c_smbus_read_byte(int fd)
 {
 	union i2c_smbus_data data;
@@ -131,6 +132,7 @@ static int32_t i2c_smbus_read_byte(int fd)
 
 	return data.byte;
 }
+#endif
 
 #if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP
 static int32_t i2c_smbus_write_byte(int fd, uint8_t val)


More information about the busybox-cvs mailing list