Skip to content

Commit 3df8424

Browse files
committed
Silence some warnings from Visual Studio C.
1 parent a4c1758 commit 3df8424

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

deflate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
329329
# define _tr_tally_dist(s, distance, length, flush) \
330330
{ uch len = (uch)(length); \
331331
ush dist = (ush)(distance); \
332-
s->sym_buf[s->sym_next++] = dist; \
333-
s->sym_buf[s->sym_next++] = dist >> 8; \
332+
s->sym_buf[s->sym_next++] = (uch)dist; \
333+
s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
334334
s->sym_buf[s->sym_next++] = len; \
335335
dist--; \
336336
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \

trees.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,9 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
10171017
unsigned dist; /* distance of matched string */
10181018
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
10191019
{
1020-
s->sym_buf[s->sym_next++] = dist;
1021-
s->sym_buf[s->sym_next++] = dist >> 8;
1022-
s->sym_buf[s->sym_next++] = lc;
1020+
s->sym_buf[s->sym_next++] = (uch)dist;
1021+
s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
1022+
s->sym_buf[s->sym_next++] = (uch)lc;
10231023
if (dist == 0) {
10241024
/* lc is the unmatched char */
10251025
s->dyn_ltree[lc].Freq++;

0 commit comments

Comments
 (0)