aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-12-01 17:54:23 +0200
committerLasse Collin <lasse.collin@tukaani.org>2022-12-01 17:54:23 +0200
commit94adf057f27b1970f493dc99cd166407d7255639 (patch)
treef722d4598871841efad7b966321e4289eeb83e4e
parentTranslations: Update the Chinese (simplified) translation. (diff)
downloadxz-94adf057f27b1970f493dc99cd166407d7255639.tar.xz
liblzma: Silence unused variable warning when BCJ filters are disabled.
Thanks to Jia Tan for the original patch.
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/string_conversion.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/liblzma/common/string_conversion.c b/src/liblzma/common/string_conversion.c
index 04a70167..53fdff2a 100644
--- a/src/liblzma/common/string_conversion.c
+++ b/src/liblzma/common/string_conversion.c
@@ -237,6 +237,20 @@ static const char *parse_options(const char **const str, const char *str_end,
// BCJ //
/////////
+#if defined(HAVE_ENCODER_X86) \
+ || defined(HAVE_DECODER_X86) \
+ || defined(HAVE_ENCODER_ARM) \
+ || defined(HAVE_DECODER_ARM) \
+ || defined(HAVE_ENCODER_ARMTHUMB) \
+ || defined(HAVE_DECODER_ARMTHUMB) \
+ || defined(HAVE_ENCODER_ARM64) \
+ || defined(HAVE_DECODER_ARM64) \
+ || defined(HAVE_ENCODER_POWERPC) \
+ || defined(HAVE_DECODER_POWERPC) \
+ || defined(HAVE_ENCODER_IA64) \
+ || defined(HAVE_DECODER_IA64) \
+ || defined(HAVE_ENCODER_SPARC) \
+ || defined(HAVE_DECODER_SPARC)
static const option_map bcj_optmap[] = {
{
.name = "start",
@@ -256,6 +270,7 @@ parse_bcj(const char **const str, const char *str_end, void *filter_options)
return parse_options(str, str_end, filter_options,
bcj_optmap, ARRAY_SIZE(bcj_optmap));
}
+#endif
///////////