diff options
| author | Mark Adler <git@madler.net> | 2026-02-13 17:26:40 -0800 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-02-13 17:26:40 -0800 |
| commit | f4f34491eaa63a6493098251971f5dd28819b133 (patch) | |
| tree | c2074acbfa6362f708caf1d873ba075a43e735f9 | |
| parent | 9ac9b6bb2d1858e1d95561642f672798deb5c5f4 (diff) | |
| download | zlib-f4f34491eaa63a6493098251971f5dd28819b133.tar.gz zlib-f4f34491eaa63a6493098251971f5dd28819b133.tar.bz2 zlib-f4f34491eaa63a6493098251971f5dd28819b133.zip | |
Clean up debug sign conversions in deflate.c and trees.c.
| -rw-r--r-- | deflate.c | 8 | ||||
| -rw-r--r-- | trees.c | 6 |
2 files changed, 7 insertions, 7 deletions
| @@ -1599,7 +1599,7 @@ local uInt longest_match(deflate_state *s, IPos cur_match) { | |||
| 1599 | local void check_match(deflate_state *s, IPos start, IPos match, int length) { | 1599 | local void check_match(deflate_state *s, IPos start, IPos match, int length) { |
| 1600 | /* check that the match is indeed a match */ | 1600 | /* check that the match is indeed a match */ |
| 1601 | Bytef *back = s->window + (int)match, *here = s->window + start; | 1601 | Bytef *back = s->window + (int)match, *here = s->window + start; |
| 1602 | IPos len = length; | 1602 | IPos len = (IPos)length; |
| 1603 | if (match == (IPos)-1) { | 1603 | if (match == (IPos)-1) { |
| 1604 | /* match starts one byte before the current window -- just compare the | 1604 | /* match starts one byte before the current window -- just compare the |
| 1605 | subsequent length-1 bytes */ | 1605 | subsequent length-1 bytes */ |
| @@ -1893,7 +1893,7 @@ local block_state deflate_fast(deflate_state *s, int flush) { | |||
| 1893 | /* longest_match() sets match_start */ | 1893 | /* longest_match() sets match_start */ |
| 1894 | } | 1894 | } |
| 1895 | if (s->match_length >= MIN_MATCH) { | 1895 | if (s->match_length >= MIN_MATCH) { |
| 1896 | check_match(s, s->strstart, s->match_start, s->match_length); | 1896 | check_match(s, s->strstart, s->match_start, (int)s->match_length); |
| 1897 | 1897 | ||
| 1898 | _tr_tally_dist(s, s->strstart - s->match_start, | 1898 | _tr_tally_dist(s, s->strstart - s->match_start, |
| 1899 | s->match_length - MIN_MATCH, bflush); | 1899 | s->match_length - MIN_MATCH, bflush); |
| @@ -2015,7 +2015,7 @@ local block_state deflate_slow(deflate_state *s, int flush) { | |||
| 2015 | uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; | 2015 | uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; |
| 2016 | /* Do not insert strings in hash table beyond this. */ | 2016 | /* Do not insert strings in hash table beyond this. */ |
| 2017 | 2017 | ||
| 2018 | check_match(s, s->strstart - 1, s->prev_match, s->prev_length); | 2018 | check_match(s, s->strstart - 1, s->prev_match, (int)s->prev_length); |
| 2019 | 2019 | ||
| 2020 | _tr_tally_dist(s, s->strstart - 1 - s->prev_match, | 2020 | _tr_tally_dist(s, s->strstart - 1 - s->prev_match, |
| 2021 | s->prev_length - MIN_MATCH, bflush); | 2021 | s->prev_length - MIN_MATCH, bflush); |
| @@ -2123,7 +2123,7 @@ local block_state deflate_rle(deflate_state *s, int flush) { | |||
| 2123 | 2123 | ||
| 2124 | /* Emit match if have run of MIN_MATCH or longer, else emit literal */ | 2124 | /* Emit match if have run of MIN_MATCH or longer, else emit literal */ |
| 2125 | if (s->match_length >= MIN_MATCH) { | 2125 | if (s->match_length >= MIN_MATCH) { |
| 2126 | check_match(s, s->strstart, s->strstart - 1, s->match_length); | 2126 | check_match(s, s->strstart, s->strstart - 1, (int)s->match_length); |
| 2127 | 2127 | ||
| 2128 | _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); | 2128 | _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); |
| 2129 | 2129 | ||
| @@ -188,7 +188,7 @@ local void bi_windup(deflate_state *s) { | |||
| 188 | s->bi_buf = 0; | 188 | s->bi_buf = 0; |
| 189 | s->bi_valid = 0; | 189 | s->bi_valid = 0; |
| 190 | #ifdef ZLIB_DEBUG | 190 | #ifdef ZLIB_DEBUG |
| 191 | s->bits_sent = (s->bits_sent + 7) & ~7; | 191 | s->bits_sent = (s->bits_sent + 7) & ~(ulg)7; |
| 192 | #endif | 192 | #endif |
| 193 | } | 193 | } |
| 194 | 194 | ||
| @@ -934,7 +934,7 @@ local void compress_block(deflate_state *s, const ct_data *ltree, | |||
| 934 | extra = extra_dbits[code]; | 934 | extra = extra_dbits[code]; |
| 935 | if (extra != 0) { | 935 | if (extra != 0) { |
| 936 | dist -= (unsigned)base_dist[code]; | 936 | dist -= (unsigned)base_dist[code]; |
| 937 | send_bits(s, dist, extra); /* send the extra distance bits */ | 937 | send_bits(s, (int)dist, extra); /* send the extra bits */ |
| 938 | } | 938 | } |
| 939 | } /* literal or match pair ? */ | 939 | } /* literal or match pair ? */ |
| 940 | 940 | ||
| @@ -1085,7 +1085,7 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, | |||
| 1085 | #endif | 1085 | #endif |
| 1086 | } | 1086 | } |
| 1087 | Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3, | 1087 | Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3, |
| 1088 | s->compressed_len - 7*last)); | 1088 | s->compressed_len - 7*(ulg)last)); |
| 1089 | } | 1089 | } |
| 1090 | 1090 | ||
| 1091 | /* =========================================================================== | 1091 | /* =========================================================================== |
