summaryrefslogtreecommitdiff
path: root/zlib
diff options
context:
space:
mode:
Diffstat (limited to 'zlib')
-rw-r--r--zlib/gzread.c6
-rw-r--r--zlib/gzwrite.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/zlib/gzread.c b/zlib/gzread.c
index 956b91ea7d9..561268fd340 100644
--- a/zlib/gzread.c
+++ b/zlib/gzread.c
@@ -316,7 +316,7 @@ local z_size_t gz_read(state, buf, len)
/* set n to the maximum amount of len that fits in an unsigned int */
n = -1;
if (n > len)
- n = len;
+ n = (unsigned)len;
/* first just try copying data from the output buffer */
if (state->x.have) {
@@ -397,7 +397,7 @@ int ZEXPORT gzread(file, buf, len)
}
/* read len or fewer bytes to buf */
- len = gz_read(state, buf, len);
+ len = (int)gz_read(state, buf, len);
/* check for an error */
if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR)
@@ -469,7 +469,7 @@ int ZEXPORT gzgetc(file)
}
/* nothing there -- try gz_read() */
- ret = gz_read(state, buf, 1);
+ ret = (int)gz_read(state, buf, 1);
return ret < 1 ? -1 : buf[0];
}
diff --git a/zlib/gzwrite.c b/zlib/gzwrite.c
index c7b5651d70b..706be56bbe4 100644
--- a/zlib/gzwrite.c
+++ b/zlib/gzwrite.c
@@ -209,7 +209,7 @@ local z_size_t gz_write(state, buf, len)
state->in);
copy = state->size - have;
if (copy > len)
- copy = len;
+ copy = (unsigned)len;
memcpy(state->in + have, buf, copy);
state->strm.avail_in += copy;
state->x.pos += copy;
@@ -229,7 +229,7 @@ local z_size_t gz_write(state, buf, len)
do {
unsigned n = (unsigned)-1;
if (n > len)
- n = len;
+ n = (unsigned)len;
state->strm.avail_in = n;
state->x.pos += n;
if (gz_comp(state, Z_NO_FLUSH) == -1)
@@ -368,7 +368,7 @@ int ZEXPORT gzputs(file, str)
/* write string */
len = strlen(str);
- ret = gz_write(state, str, len);
+ ret = (int)gz_write(state, str, len);
return ret == 0 && len != 0 ? -1 : ret;
}