提交 bfcace04 编写于 作者: M Mark Adler

Do not initialize unsigned with -1 in compress.c uncompr.c.

Sun compiler complained.  Use (unsigned)0 - 1 instead.
上级 43bfaba3
...@@ -28,7 +28,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) ...@@ -28,7 +28,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
{ {
z_stream stream; z_stream stream;
int err; int err;
const uInt max = -1; const uInt max = (uInt)0 - 1;
uLong left; uLong left;
left = *destLen; left = *destLen;
......
...@@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen) ...@@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
{ {
z_stream stream; z_stream stream;
int err; int err;
const uInt max = -1; const uInt max = (uInt)0 - 1;
uLong left; uLong left;
Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册