aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--deflate.c8
-rw-r--r--trees.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/deflate.c b/deflate.c
index edea7e5..4b804e6 100644
--- a/deflate.c
+++ b/deflate.c
@@ -1671,10 +1671,10 @@ local block_state deflate_stored(deflate_state *s, int flush) {
1671 _tr_stored_block(s, (char *)0, 0L, last); 1671 _tr_stored_block(s, (char *)0, 0L, last);
1672 1672
1673 /* Replace the lengths in the dummy stored block with len. */ 1673 /* Replace the lengths in the dummy stored block with len. */
1674 s->pending_buf[s->pending - 4] = len; 1674 s->pending_buf[s->pending - 4] = (Bytef)len;
1675 s->pending_buf[s->pending - 3] = len >> 8; 1675 s->pending_buf[s->pending - 3] = (Bytef)(len >> 8);
1676 s->pending_buf[s->pending - 2] = ~len; 1676 s->pending_buf[s->pending - 2] = (Bytef)~len;
1677 s->pending_buf[s->pending - 1] = ~len >> 8; 1677 s->pending_buf[s->pending - 1] = (Bytef)(~len >> 8);
1678 1678
1679 /* Write the stored block header bytes. */ 1679 /* Write the stored block header bytes. */
1680 flush_pending(s->strm); 1680 flush_pending(s->strm);
diff --git a/trees.c b/trees.c
index 6a523ef..979ae41 100644
--- a/trees.c
+++ b/trees.c
@@ -724,7 +724,7 @@ local void scan_tree(deflate_state *s, ct_data *tree, int max_code) {
724 if (++count < max_count && curlen == nextlen) { 724 if (++count < max_count && curlen == nextlen) {
725 continue; 725 continue;
726 } else if (count < min_count) { 726 } else if (count < min_count) {
727 s->bl_tree[curlen].Freq += count; 727 s->bl_tree[curlen].Freq += (ush)count;
728 } else if (curlen != 0) { 728 } else if (curlen != 0) {
729 if (curlen != prevlen) s->bl_tree[curlen].Freq++; 729 if (curlen != prevlen) s->bl_tree[curlen].Freq++;
730 s->bl_tree[REP_3_6].Freq++; 730 s->bl_tree[REP_3_6].Freq++;