[PATCH RFC 4/4] erofs-utils: lib: remove the compile warning
Hongbo Li
lihongbo22 at huawei.com
Tue Apr 22 22:36:12 AEST 2025
Add the condition macro to avoid the compile warning.
Signed-off-by: Hongbo Li <lihongbo22 at huawei.com>
---
lib/decompress.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/decompress.c b/lib/decompress.c
index 3f553a8..1e9fad7 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -9,6 +9,8 @@
#include "erofs/err.h"
#include "erofs/print.h"
+#if defined(HAVE_LIBZSTD) || defined(HAVE_QPL) || defined(HAVE_LIBDEFLATE) || \
+ defined(HAVE_ZLIB) || defined(HAVE_LIBLZMA) || defined(LZ4_ENABLED)
static unsigned int z_erofs_fixup_insize(const u8 *padbuf, unsigned int padbufsize)
{
unsigned int inputmargin;
@@ -17,6 +19,7 @@ static unsigned int z_erofs_fixup_insize(const u8 *padbuf, unsigned int padbufsi
!padbuf[inputmargin]; ++inputmargin);
return inputmargin;
}
+#endif
#ifdef HAVE_LIBZSTD
#include <zstd.h>
--
2.22.0
More information about the Linux-erofs
mailing list