]> git.sesse.net Git - fjl/commitdiff
Fix some errors/warnings in driver.c.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 16:07:47 +0000 (18:07 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 16:07:47 +0000 (18:07 +0200)
driver.c

index c5ae87e3b003cc2b060ccfe3fa1571ff817a2246..6dcc8b3da676161ecd60e05898a27ebe3d19bf3f 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -121,8 +121,6 @@ void decode_ac_coefficients(const struct huffman_table* tbl, struct bit_source*
                unsigned lookup = peek_bits(bits, DEHUF_AC_TABLE_BITS);
                int code = tbl->ac_table_codes[lookup];
 
-               assert(length == AC_DEHUF_SLOW_PATH || (length > 0 && length <= DEHUF_AC_TABLE_BITS));
-
                if (__builtin_expect(code == AC_DEHUF_SLOW_PATH, 0)) {
                        unsigned rs = read_huffman_symbol_no_refill(tbl, bits);
                        unsigned r = rs >> 4;
@@ -143,7 +141,7 @@ void decode_ac_coefficients(const struct huffman_table* tbl, struct bit_source*
 
                        coeff[unzigzag[i]] = extend(read_bits(bits, s), s);
                } else {
-                       int length = tbl->ac_table_length[lookup];
+                       unsigned length = tbl->ac_table_length[lookup];
                        int r = tbl->ac_table_skip[lookup];
                        assert(r >= 0);
                        i += r;