aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-11-20 11:36:15 -0800
committerMark Adler <madler@alumni.caltech.edu>2016-12-04 07:48:47 -0800
commit21c66cd5ac8876f48a19882074933c6275eaa022 (patch)
treea1e354078786b4399af68102ad8f65198aeed61a
parent37281ac222ee7ceb8cc3253f13c8fa26a88dd566 (diff)
downloadzlib-21c66cd5ac8876f48a19882074933c6275eaa022.tar.gz
zlib-21c66cd5ac8876f48a19882074933c6275eaa022.tar.bz2
zlib-21c66cd5ac8876f48a19882074933c6275eaa022.zip
Increase verbosity required to warn about bit length overflow.
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.
-rw-r--r--trees.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trees.c b/trees.c
index 37e35d3..685a388 100644
--- a/trees.c
+++ b/trees.c
@@ -525,7 +525,7 @@ local void gen_bitlen(s, desc)
525 } 525 }
526 if (overflow == 0) return; 526 if (overflow == 0) return;
527 527
528 Trace((stderr,"\nbit length overflow\n")); 528 Tracev((stderr,"\nbit length overflow\n"));
529 /* This happens for example on obj2 and pic of the Calgary corpus */ 529 /* This happens for example on obj2 and pic of the Calgary corpus */
530 530
531 /* Find the first bit length which could increase: */ 531 /* Find the first bit length which could increase: */
@@ -552,7 +552,7 @@ local void gen_bitlen(s, desc)
552 m = s->heap[--h]; 552 m = s->heap[--h];
553 if (m > max_code) continue; 553 if (m > max_code) continue;
554 if ((unsigned) tree[m].Len != (unsigned) bits) { 554 if ((unsigned) tree[m].Len != (unsigned) bits) {
555 Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); 555 Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
556 s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq; 556 s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
557 tree[m].Len = (ush)bits; 557 tree[m].Len = (ush)bits;
558 } 558 }