diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-05-26 17:19:17 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-05-30 21:25:18 +0200 |
commit | d420aa05d3ea52a30885db9013902644098c55ac (patch) | |
tree | 41b02ca474834f3a3adc194dda87c9ffff9fd8af /deflate.c | |
parent | 55182793f84ca3f07a2963a0e61ff3f68bfb141f (diff) |
Fixed casting warnings in calls to put_short and put_short_msb.
deflate.c(845,32): warning C4244: 'function': conversion from 'unsigned int' to 'uint16_t', possible loss of data
deflate.c(894,50): warning C4244: 'function': conversion from 'unsigned int' to 'uint16_t', possible loss of data
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -842,7 +842,7 @@ int ZEXPORT PREFIX(deflate)(PREFIX3(stream) *strm, int flush) { if (s->strstart != 0) header |= PRESET_DICT; header += 31 - (header % 31); - put_short_msb(s, header); + put_short_msb(s, (uint16_t)header); /* Save the adler32 of the preset dictionary: */ if (s->strstart != 0) { @@ -891,7 +891,7 @@ int ZEXPORT PREFIX(deflate)(PREFIX3(stream) *strm, int flush) { (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? 4 : 0)); put_byte(s, s->gzhead->os & 0xff); if (s->gzhead->extra != NULL) { - put_short(s, s->gzhead->extra_len); + put_short(s, (uint16_t)s->gzhead->extra_len); } if (s->gzhead->hcrc) strm->adler = PREFIX(crc32)(strm->adler, s->pending_buf, s->pending); |