summaryrefslogtreecommitdiff
path: root/deflate.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-10-11 22:15:50 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-10-11 22:15:50 -0700
commit7096424f23df1b1813237fb5f8bc8f34cfcedd0c (patch)
treec41e8ef447e7e6764be5f3ba822fdc0c8da049f1 /deflate.h
parent2edb94a3025d288dc251bc6cbb2c02e60fbd7438 (diff)
downloadzlib-7096424f23df1b1813237fb5f8bc8f34cfcedd0c.tar.gz
Clean up type conversions.
Diffstat (limited to 'deflate.h')
-rw-r--r--deflate.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/deflate.h b/deflate.h
index f18c616..fdc0a12 100644
--- a/deflate.h
+++ b/deflate.h
@@ -275,7 +275,7 @@ typedef struct internal_state {
/* Output a byte on the stream.
* IN assertion: there is enough room in pending_buf.
*/
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
@@ -328,8 +328,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
flush = (s->last_lit == s->lit_bufsize-1); \
}
# define _tr_tally_dist(s, distance, length, flush) \
- { uch len = (length); \
- ush dist = (distance); \
+ { uch len = (uch)(length); \
+ ush dist = (ush)(distance); \
s->d_buf[s->last_lit] = dist; \
s->l_buf[s->last_lit++] = len; \
dist--; \