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.
This commit is contained in:
Lasse Collin 2019-06-25 00:08:13 +03:00
parent 25f7455472
commit f18eee9d15
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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)