aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-11 01:08:03 +0800
committerJia Tan <jiat0218@gmail.com>2023-01-11 01:08:03 +0800
commit7c23c05befdcc73231c0d6632a7d943dbeaea1aa (patch)
treec0c565950f70c34a9cef8410901bca11b2933898 /tests
parentCI/CD: Add 32-bit build and test steps to Ubuntu autotools runner. (diff)
downloadxz-7c23c05befdcc73231c0d6632a7d943dbeaea1aa.tar.xz
Tests: Fix unused function warning in test_index_hash.
test_index_hash does not use fill_index_hash() unless both encoders and decoders are configured in the build.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_index_hash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_index_hash.c b/tests/test_index_hash.c
index 2cf91138..f3c6e8fc 100644
--- a/tests/test_index_hash.c
+++ b/tests/test_index_hash.c
@@ -89,7 +89,7 @@ test_lzma_index_hash_append(void)
}
-#ifdef HAVE_DECODERS
+#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS)
// Fill an index_hash with unpadded and uncompressed VLIs
// by calling lzma_index_hash_append
static void
@@ -102,7 +102,6 @@ fill_index_hash(lzma_index_hash *index_hash, const lzma_vli *unpadded_sizes,
}
-#ifdef HAVE_ENCODERS
// Set the contents of buf to the expected Index based on the
// .xz specification. This needs the unpadded and uncompressed VLIs
// to correctly create the Index.
@@ -145,7 +144,6 @@ generate_index(uint8_t *buf, const lzma_vli *unpadded_sizes,
assert_uint_eq(out_pos, index_max_size);
}
#endif
-#endif
static void