summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2015-08-02 16:47:14 -0700
committerMark Adler <madler@alumni.caltech.edu>2015-08-02 17:22:20 -0700
commitbfcace04f91bd27c8c7c040da2396fe4b7724422 (patch)
tree41fc707b03f7825fb4bc600d0522256e011e1bca
parent43bfaba3d718a27c1b137b1d1aa90d9427ab4a4f (diff)
downloadzlib-bfcace04f91bd27c8c7c040da2396fe4b7724422.tar.gz
zlib-bfcace04f91bd27c8c7c040da2396fe4b7724422.tar.bz2
zlib-bfcace04f91bd27c8c7c040da2396fe4b7724422.zip
Do not initialize unsigned with -1 in compress.c uncompr.c.
Sun compiler complained. Use (unsigned)0 - 1 instead.
-rw-r--r--compress.c2
-rw-r--r--uncompr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/compress.c b/compress.c
index 85a96df..e5831e8 100644
--- a/compress.c
+++ b/compress.c
@@ -28,7 +28,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
28{ 28{
29 z_stream stream; 29 z_stream stream;
30 int err; 30 int err;
31 const uInt max = -1; 31 const uInt max = (uInt)0 - 1;
32 uLong left; 32 uLong left;
33 33
34 left = *destLen; 34 left = *destLen;
diff --git a/uncompr.c b/uncompr.c
index 2ec3eba..f3f883a 100644
--- a/uncompr.c
+++ b/uncompr.c
@@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
30{ 30{
31 z_stream stream; 31 z_stream stream;
32 int err; 32 int err;
33 const uInt max = -1; 33 const uInt max = (uInt)0 - 1;
34 uLong left; 34 uLong left;
35 Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ 35 Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */
36 36