From: Mark Adler Date: Sun, 2 Aug 2015 23:47:14 +0000 (-0700) Subject: Do not initialize unsigned with -1 in compress.c uncompr.c. X-Git-Tag: 1.9.9-b1~793^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b673ee00f31131afef396aecae3e3b6a1321c0f2;p=thirdparty%2Fzlib-ng.git Do not initialize unsigned with -1 in compress.c uncompr.c. Sun compiler complained. Use (unsigned)0 - 1 instead. --- diff --git a/compress.c b/compress.c index abae9b3ae..2e4c8d7fd 100644 --- a/compress.c +++ b/compress.c @@ -23,7 +23,7 @@ int ZEXPORT compress2(unsigned char *dest, uLong *destLen, const unsigned char * uLong sourceLen, int level) { z_stream stream; int err; - const uInt max = -1; + const uInt max = (uInt)0 - 1; uLong left; left = *destLen; diff --git a/uncompr.c b/uncompr.c index ab61f7424..d94d3d624 100644 --- a/uncompr.c +++ b/uncompr.c @@ -25,7 +25,7 @@ int ZEXPORT uncompress(unsigned char *dest, uLong *destLen, const unsigned char *source, uLong sourceLen) { z_stream stream; int err; - const uInt max = -1; + const uInt max = (uInt)0 - 1; uLong left; Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */