X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flzx_compress.c;h=588b81d8b9a33c1f19196f7735fcc155e675cf8f;hp=19e2daa2a97de024115e4b65ff0097661cd05a73;hb=32158cb5b4df58eb71a1986762e5aaf12bce9d30;hpb=993d197cac3a09508f2afefe0e2a620d7e43fa1a diff --git a/src/lzx_compress.c b/src/lzx_compress.c index 19e2daa2..588b81d8 100644 --- a/src/lzx_compress.c +++ b/src/lzx_compress.c @@ -542,7 +542,7 @@ struct lzx_output_bitstream { /* Can the specified number of bits always be added to 'bitbuf' after any * pending 16-bit coding units have been flushed? */ -#define CAN_BUFFER(n) ((n) <= (8 * sizeof(machine_word_t)) - 15) +#define CAN_BUFFER(n) ((n) <= WORDBITS - 15) /* * Initialize the output bitstream. @@ -892,7 +892,7 @@ lzx_write_sequences(struct lzx_output_bitstream *os, int block_type, if (litrunlen) { /* Is the literal run nonempty? */ /* Verify optimization is enabled on 64-bit */ - STATIC_ASSERT(sizeof(machine_word_t) < 8 || + STATIC_ASSERT(WORDBITS < 64 || CAN_BUFFER(4 * MAIN_CODEWORD_LIMIT)); if (CAN_BUFFER(4 * MAIN_CODEWORD_LIMIT)) { @@ -968,7 +968,7 @@ lzx_write_sequences(struct lzx_output_bitstream *os, int block_type, 14 + ALIGNED_CODEWORD_LIMIT) /* Verify optimization is enabled on 64-bit */ - STATIC_ASSERT(sizeof(machine_word_t) < 8 || CAN_BUFFER(MAX_MATCH_BITS)); + STATIC_ASSERT(WORDBITS < 64 || CAN_BUFFER(MAX_MATCH_BITS)); /* Output the main symbol for the match. */