summaryrefslogtreecommitdiff
path: root/deflate.h
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@solidstatenetworks.com>2019-06-04 01:50:22 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-06-04 10:50:22 +0200
commitd229a141cc32318897816096a22d24ea1ac166cd (patch)
treef76741fba55ec246c07eee363776ce223f23b52e /deflate.h
parentef3edcb9135c4a5dd6443a0162c8a9ff31841955 (diff)
Fixed compiler warnings on Windows in release mode (#349)
This pull request attempts to fix some compiler warnings on Windows when compiled in Release mode. ``` "zlib-ng\ALL_BUILD.vcxproj" (default target) (1) -> "zlib-ng\zlibstatic.vcxproj" (default target) (6) -> zlib-ng\deflate.c(1626): warning C4244: '=': conversion from 'uint16_t' to 'unsigned cha r', possible loss of data [zlib-ng\zlibstatic.vcxproj] zlib-ng\deflate_fast.c(61): warning C4244: '=': conversion from 'uint16_t' to 'unsigned char', possible loss of data [zlib-ng\zlibstatic.vcxproj] zlib-ng\deflate_slow.c(89): warning C4244: '=': conversion from 'uint16_t' to 'unsigned char', possible loss of data [zlib-ng\zlibstatic.vcxproj] ```
Diffstat (limited to 'deflate.h')
-rw-r--r--deflate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/deflate.h b/deflate.h
index 76b7f3b..bbe8f6b 100644
--- a/deflate.h
+++ b/deflate.h
@@ -378,7 +378,7 @@ void ZLIB_INTERNAL flush_pending(PREFIX3(streamp) strm);
#else
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
# define _tr_tally_dist(s, distance, length, flush) \
- flush = _tr_tally(s, distance, length)
+ flush = _tr_tally(s, (unsigned)(distance), (unsigned)(length))
#endif
/* ===========================================================================