diff options
author | Jia Tan <jiat0218@gmail.com> | 2023-02-24 18:10:37 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-02-24 21:11:18 +0800 |
commit | 9aa7fdeb04c486d2700967090956af88fdccab7e (patch) | |
tree | f6b9b2c589718f518dcb36be6f6e7b9043dd9499 /tests | |
parent | liblzma: Replace '\n' -> newline in filter.h documentation. (diff) | |
download | xz-9aa7fdeb04c486d2700967090956af88fdccab7e.tar.xz |
Tests: Small tweak to test-vli.c.
The static global variables can be disabled if encoders and decoders
are not built. If they are not disabled and -Werror is used, it will
cause an usused warning as an error.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_vli.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_vli.c b/tests/test_vli.c index 793dcf2e..e82e7270 100644 --- a/tests/test_vli.c +++ b/tests/test_vli.c @@ -17,6 +17,7 @@ // VLI can have between 1 and 9 bytes when encoded // They are encoded little endian where all but the last // byte must have the leading 1 bit set +#if defined(HAVE_ENCODERS) || defined(HAVE_DECODERS) static const uint8_t one_byte[1] = {0x25}; static const lzma_vli one_byte_value = 37; @@ -46,6 +47,7 @@ static const lzma_vli eight_byte_value = 55818443594433425; static const uint8_t nine_bytes[9] = {0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, 0x1}; static const lzma_vli nine_byte_value = 136100349976529025; +#endif static void |