diff options
| author | Levi Broderick <levib@microsoft.com> | 2023-08-30 10:50:57 -0700 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2024-01-23 08:45:00 -0800 |
| commit | 8a76f02e0e05860f72a269d305a0e11af224f609 (patch) | |
| tree | 940ec8ec501e0c608dc3d66385a84998abbaaedf | |
| parent | df3b26506453866c608bc0155293716a17a351b9 (diff) | |
| download | zlib-8a76f02e0e05860f72a269d305a0e11af224f609.tar.gz zlib-8a76f02e0e05860f72a269d305a0e11af224f609.tar.bz2 zlib-8a76f02e0e05860f72a269d305a0e11af224f609.zip | |
Avoid implicit conversion warnings in deflate.c and trees.c.
| -rw-r--r-- | deflate.c | 8 | ||||
| -rw-r--r-- | trees.c | 2 |
2 files changed, 5 insertions, 5 deletions
| @@ -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); |
| @@ -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++; |
