diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-12-30 22:05:05 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2016-12-30 23:42:10 -0800 |
commit | 8f147c3d12591a811c5438c011d4203bb7fc5260 (patch) | |
tree | 72456761e2a029716ba4cf0b2e598c67f8ed73e6 /deflate.c | |
parent | fb26fc427fb5b628e1ee062d08be334c1b8c3bbe (diff) | |
download | zlib-8f147c3d12591a811c5438c011d4203bb7fc5260.tar.gz zlib-8f147c3d12591a811c5438c011d4203bb7fc5260.tar.bz2 zlib-8f147c3d12591a811c5438c011d4203bb7fc5260.zip |
Avoid some random compiler warnings on various platforms.
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -447,11 +447,12 @@ int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) | |||
447 | uInt *dictLength; | 447 | uInt *dictLength; |
448 | { | 448 | { |
449 | deflate_state *s; | 449 | deflate_state *s; |
450 | uInt len; | ||
450 | 451 | ||
451 | if (deflateStateCheck(strm)) | 452 | if (deflateStateCheck(strm)) |
452 | return Z_STREAM_ERROR; | 453 | return Z_STREAM_ERROR; |
453 | s = strm->state; | 454 | s = strm->state; |
454 | uInt len = s->strstart + s->lookahead; | 455 | len = s->strstart + s->lookahead; |
455 | if (len > s->w_size) | 456 | if (len > s->w_size) |
456 | len = s->w_size; | 457 | len = s->w_size; |
457 | if (dictionary != Z_NULL && len) | 458 | if (dictionary != Z_NULL && len) |
@@ -1758,12 +1759,12 @@ local block_state deflate_stored(s, flush) | |||
1758 | * code following this won't be able to either. | 1759 | * code following this won't be able to either. |
1759 | */ | 1760 | */ |
1760 | if (flush != Z_NO_FLUSH && s->strm->avail_in == 0 && | 1761 | if (flush != Z_NO_FLUSH && s->strm->avail_in == 0 && |
1761 | s->strstart == s->block_start) | 1762 | (long)s->strstart == s->block_start) |
1762 | return flush == Z_FINISH ? finish_done : block_done; | 1763 | return flush == Z_FINISH ? finish_done : block_done; |
1763 | 1764 | ||
1764 | /* Fill the window with any remaining input. */ | 1765 | /* Fill the window with any remaining input. */ |
1765 | have = s->window_size - s->strstart - 1; | 1766 | have = s->window_size - s->strstart - 1; |
1766 | if (s->strm->avail_in > have && s->block_start >= s->w_size) { | 1767 | if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { |
1767 | /* Slide the window down. */ | 1768 | /* Slide the window down. */ |
1768 | s->block_start -= s->w_size; | 1769 | s->block_start -= s->w_size; |
1769 | s->strstart -= s->w_size; | 1770 | s->strstart -= s->w_size; |