]> wimlib.net Git - wimlib/commitdiff
Remove LZX_ASSERT() (now almost unused)
authorEric Biggers <ebiggers3@gmail.com>
Sat, 19 Sep 2015 18:56:10 +0000 (13:56 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 27 Sep 2015 14:41:15 +0000 (09:41 -0500)
include/wimlib/lzx_common.h
src/lzx_compress.c

index ed9d0bbeeebdabc350e06382a4bdac07f4d2ee3b..4d7587584af86a09e9b7259885a6d4a73c6c7095 100644 (file)
 #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];
index 863bb5e52fae165823c0c4e89ee8122c3745c8e0..de8430145f4e7a2867ad60c59b5d17a6b5a4436e 100644 (file)
@@ -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);