From: Mark Adler Date: Sun, 20 Nov 2016 19:36:15 +0000 (-0800) Subject: Increase verbosity required to warn about bit length overflow. X-Git-Tag: 1.9.9-b1~496 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eea02140087f06b3787f9c6a7ce59f9ff71a9902;p=thirdparty%2Fzlib-ng.git 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. --- diff --git a/trees.c b/trees.c index de4ca2491..ef47abdc6 100644 --- a/trees.c +++ b/trees.c @@ -449,7 +449,7 @@ static void gen_bitlen(deflate_state *s, tree_desc *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: */ @@ -478,7 +478,7 @@ static void gen_bitlen(deflate_state *s, tree_desc *desc) { if (m > max_code) continue; if (tree[m].Len != bits) { - Trace((stderr, "code %d bits %d->%u\n", m, tree[m].Len, bits)); + Tracev((stderr, "code %d bits %d->%u\n", m, tree[m].Len, bits)); s->opt_len += (unsigned long)(bits * tree[m].Freq); s->opt_len -= (unsigned long)(tree[m].Len * tree[m].Freq); tree[m].Len = (uint16_t)bits;