From 26396c2c45946ba38c18c6ac0207e8c1f68e4668 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 19 Sep 2015 13:56:10 -0500 Subject: [PATCH] Remove LZX_ASSERT() (now almost unused) --- include/wimlib/lzx_common.h | 8 -------- src/lzx_compress.c | 4 ---- 2 files changed, 12 deletions(-) diff --git a/include/wimlib/lzx_common.h b/include/wimlib/lzx_common.h index ed9d0bbe..4d758758 100644 --- a/include/wimlib/lzx_common.h +++ b/include/wimlib/lzx_common.h @@ -11,14 +11,6 @@ #include "wimlib/lzx_constants.h" #include "wimlib/types.h" -//#define ENABLE_LZX_DEBUG -#ifdef ENABLE_LZX_DEBUG -# include "wimlib/assert.h" -# define LZX_ASSERT wimlib_assert -#else -# define LZX_ASSERT(...) -#endif - extern const u32 lzx_offset_slot_base[LZX_MAX_OFFSET_SLOTS + 1]; extern const u8 lzx_extra_offset_bits[LZX_MAX_OFFSET_SLOTS]; diff --git a/src/lzx_compress.c b/src/lzx_compress.c index 863bb5e5..de843014 100644 --- a/src/lzx_compress.c +++ b/src/lzx_compress.c @@ -1019,9 +1019,6 @@ lzx_write_compressed_block(const u8 *block_begin, const struct lzx_lens * prev_lens, struct lzx_output_bitstream * os) { - LZX_ASSERT(block_type == LZX_BLOCKTYPE_ALIGNED || - block_type == LZX_BLOCKTYPE_VERBATIM); - /* The first three bits indicate the type of block and are one of the * LZX_BLOCKTYPE_* constants. */ lzx_write_bits(os, block_type, 3); @@ -1913,7 +1910,6 @@ lzx_find_longest_repeat_offset_match(const u8 * const in_next, unsigned *rep_max_idx_ret) { STATIC_ASSERT(LZX_NUM_RECENT_OFFSETS == 3); - LZX_ASSERT(bytes_remaining >= 2); const unsigned max_len = min(bytes_remaining, LZX_MAX_MATCH_LEN); const u16 next_2_bytes = load_u16_unaligned(in_next); -- 2.43.0