]> git.lizzy.rs Git - zlib.git/commitdiff
Increase verbosity required to warn about bit length overflow.
authorMark Adler <madler@alumni.caltech.edu>
Sun, 20 Nov 2016 19:36:15 +0000 (11:36 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Sun, 4 Dec 2016 15:48:47 +0000 (07:48 -0800)
When debugging the Huffman coding would warn about resulting codes
greater than 15 bits in length. This is handled properly, and is
not uncommon. This increases the verbosity of the warning by one,
so that it is not displayed by default.

trees.c

diff --git a/trees.c b/trees.c
index 37e35d387e7739bdc77c0de6ae9ca4532dcd0733..685a388acff9fc14d644de5454ca46404b49c6dc 100644 (file)
--- a/trees.c
+++ b/trees.c
@@ -525,7 +525,7 @@ local void gen_bitlen(s, desc)
     }
     if (overflow == 0) return;
 
-    Trace((stderr,"\nbit length overflow\n"));
+    Tracev((stderr,"\nbit length overflow\n"));
     /* This happens for example on obj2 and pic of the Calgary corpus */
 
     /* Find the first bit length which could increase: */
@@ -552,7 +552,7 @@ local void gen_bitlen(s, desc)
             m = s->heap[--h];
             if (m > max_code) continue;
             if ((unsigned) tree[m].Len != (unsigned) bits) {
-                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+                Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
                 s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
                 tree[m].Len = (ush)bits;
             }