Silence some warnings from Visual Studio C.

This commit is contained in:
Mark Adler 2022-03-28 10:50:16 -07:00
parent a4c17581d8
commit 3df842426b
2 changed files with 5 additions and 5 deletions

View File

@ -329,8 +329,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
# define _tr_tally_dist(s, distance, length, flush) \ # define _tr_tally_dist(s, distance, length, flush) \
{ uch len = (uch)(length); \ { uch len = (uch)(length); \
ush dist = (ush)(distance); \ ush dist = (ush)(distance); \
s->sym_buf[s->sym_next++] = dist; \ s->sym_buf[s->sym_next++] = (uch)dist; \
s->sym_buf[s->sym_next++] = dist >> 8; \ s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
s->sym_buf[s->sym_next++] = len; \ s->sym_buf[s->sym_next++] = len; \
dist--; \ dist--; \
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \

View File

@ -1017,9 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
unsigned dist; /* distance of matched string */ unsigned dist; /* distance of matched string */
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
{ {
s->sym_buf[s->sym_next++] = dist; s->sym_buf[s->sym_next++] = (uch)dist;
s->sym_buf[s->sym_next++] = dist >> 8; s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
s->sym_buf[s->sym_next++] = lc; s->sym_buf[s->sym_next++] = (uch)lc;
if (dist == 0) { if (dist == 0) {
/* lc is the unmatched char */ /* lc is the unmatched char */
s->dyn_ltree[lc].Freq++; s->dyn_ltree[lc].Freq++;