From 8f147c3d12591a811c5438c011d4203bb7fc5260 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 30 Dec 2016 22:05:05 -0800 Subject: Avoid some random compiler warnings on various platforms. --- deflate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'deflate.c') diff --git a/deflate.c b/deflate.c index cf4c056..9079741 100644 --- a/deflate.c +++ b/deflate.c @@ -447,11 +447,12 @@ int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) uInt *dictLength; { deflate_state *s; + uInt len; if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; - uInt len = s->strstart + s->lookahead; + len = s->strstart + s->lookahead; if (len > s->w_size) len = s->w_size; if (dictionary != Z_NULL && len) @@ -1758,12 +1759,12 @@ local block_state deflate_stored(s, flush) * code following this won't be able to either. */ if (flush != Z_NO_FLUSH && s->strm->avail_in == 0 && - s->strstart == s->block_start) + (long)s->strstart == s->block_start) return flush == Z_FINISH ? finish_done : block_done; /* Fill the window with any remaining input. */ have = s->window_size - s->strstart - 1; - if (s->strm->avail_in > have && s->block_start >= s->w_size) { + if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { /* Slide the window down. */ s->block_start -= s->w_size; s->strstart -= s->w_size; -- cgit v1.2.3-55-g6feb