mirror of https://github.com/madler/zlib
Use the correct format specifiers.
opt_len, static_len, bits_sent, etc. are all unsigned longs, not signed longs.
This commit is contained in:
parent
04f42ceca4
commit
0df9ea4dc0
|
@ -362,7 +362,7 @@ void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
|
|||
CHECK_ERR(err, "inflateEnd");
|
||||
|
||||
if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
|
||||
fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
|
||||
fprintf(stderr, "bad large inflate: %lu\n", d_stream.total_out);
|
||||
exit(1);
|
||||
} else {
|
||||
printf("large_inflate(): OK\n");
|
||||
|
|
|
@ -109,7 +109,7 @@ static char *strwinerror (error)
|
|||
LocalFree(msgbuf);
|
||||
}
|
||||
else {
|
||||
sprintf(buf, "unknown win32 error (%ld)", error);
|
||||
sprintf(buf, "unknown win32 error (%u)", error);
|
||||
}
|
||||
|
||||
SetLastError(lasterr);
|
||||
|
|
12
trees.c
12
trees.c
|
@ -820,7 +820,7 @@ local int build_bl_tree(s)
|
|||
}
|
||||
/* Update opt_len to include the bit length tree and counts */
|
||||
s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4;
|
||||
Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
|
||||
Tracev((stderr, "\ndyn trees: dyn %lu, stat %lu",
|
||||
s->opt_len, s->static_len));
|
||||
|
||||
return max_blindex;
|
||||
|
@ -848,13 +848,13 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
|
|||
Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
|
||||
send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
|
||||
}
|
||||
Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
|
||||
Tracev((stderr, "\nbl tree: sent %lu", s->bits_sent));
|
||||
|
||||
send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1); /* literal tree */
|
||||
Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
|
||||
Tracev((stderr, "\nlit tree: sent %lu", s->bits_sent));
|
||||
|
||||
send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1); /* distance tree */
|
||||
Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
|
||||
Tracev((stderr, "\ndist tree: sent %lu", s->bits_sent));
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
|
@ -927,11 +927,11 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
|||
|
||||
/* Construct the literal and distance trees */
|
||||
build_tree(s, (tree_desc *)(&(s->l_desc)));
|
||||
Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
|
||||
Tracev((stderr, "\nlit data: dyn %lu, stat %lu", s->opt_len,
|
||||
s->static_len));
|
||||
|
||||
build_tree(s, (tree_desc *)(&(s->d_desc)));
|
||||
Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
|
||||
Tracev((stderr, "\ndist data: dyn %lu, stat %lu", s->opt_len,
|
||||
s->static_len));
|
||||
/* At this point, opt_len and static_len are the total bit lengths of
|
||||
* the compressed block data, excluding the tree representations.
|
||||
|
|
Loading…
Reference in New Issue