summaryrefslogtreecommitdiff
path: root/gzread.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-10-11 22:15:50 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-10-11 22:15:50 -0700
commit7096424f23df1b1813237fb5f8bc8f34cfcedd0c (patch)
treec41e8ef447e7e6764be5f3ba822fdc0c8da049f1 /gzread.c
parent2edb94a3025d288dc251bc6cbb2c02e60fbd7438 (diff)
downloadzlib-7096424f23df1b1813237fb5f8bc8f34cfcedd0c.tar.gz
Clean up type conversions.
Diffstat (limited to 'gzread.c')
-rw-r--r--gzread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gzread.c b/gzread.c
index bf4538e..d41704a 100644
--- a/gzread.c
+++ b/gzread.c
@@ -23,14 +23,14 @@ local int gz_load(state, buf, len, have)
unsigned len;
unsigned *have;
{
- int ret;
+ ssize_t ret;
*have = 0;
do {
ret = read(state->fd, buf + *have, len - *have);
if (ret <= 0)
break;
- *have += ret;
+ *have += (unsigned)ret;
} while (*have < len);
if (ret < 0) {
gz_error(state, Z_ERRNO, zstrerror());
@@ -451,7 +451,7 @@ int ZEXPORT gzungetc(c, file)
if (state->x.have == 0) {
state->x.have = 1;
state->x.next = state->out + (state->size << 1) - 1;
- state->x.next[0] = c;
+ state->x.next[0] = (unsigned char)c;
state->x.pos--;
state->past = 0;
return c;
@@ -473,7 +473,7 @@ int ZEXPORT gzungetc(c, file)
}
state->x.have++;
state->x.next--;
- state->x.next[0] = c;
+ state->x.next[0] = (unsigned char)c;
state->x.pos--;
state->past = 0;
return c;