diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2019-06-25 00:08:13 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2019-06-25 00:08:13 +0300 |
commit | e873902641794210ad7db59743f98e3e1cd6139f (patch) | |
tree | ea21f587ef5f0e64a6861e97da0429fea463c9e9 /tests | |
parent | liblzma: Add a comment. (diff) | |
download | xz-e873902641794210ad7db59743f98e3e1cd6139f.tar.xz |
Tests: Silence warnings from clang -Wassign-enum.
Also changed 999 to 99 so it fits even if lzma_check happened
to be 8 bits wide.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_block_header.c | 3 | ||||
-rw-r--r-- | tests/test_stream_flags.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_block_header.c b/tests/test_block_header.c index 3d9b5d93..7cd38985 100644 --- a/tests/test_block_header.c +++ b/tests/test_block_header.c @@ -127,7 +127,8 @@ test1(void) known_options.filters = filters_one; expect(lzma_block_header_size(&known_options) == LZMA_OK); - known_options.check = 999; // Some invalid value, which gets ignored. + // Some invalid value, which gets ignored. + known_options.check = (lzma_check)(99); expect(lzma_block_header_size(&known_options) == LZMA_OK); known_options.compressed_size = 5; diff --git a/tests/test_stream_flags.c b/tests/test_stream_flags.c index 9611459e..b40d035b 100644 --- a/tests/test_stream_flags.c +++ b/tests/test_stream_flags.c @@ -83,7 +83,7 @@ test_footer(void) static void test_encode_invalid(void) { - known_flags.check = LZMA_CHECK_ID_MAX + 1; + known_flags.check = (lzma_check)(LZMA_CHECK_ID_MAX + 1); known_flags.backward_size = 1024; expect(lzma_stream_header_encode(&known_flags, buffer) |