aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gzread.c2
-rw-r--r--gzwrite.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/gzread.c b/gzread.c
index 52a5019a..b198a44c 100644
--- a/gzread.c
+++ b/gzread.c
@@ -27,7 +27,7 @@ local int gz_load(gz_statep state, unsigned char *buf, unsigned len,
27 get = len - *have; 27 get = len - *have;
28 if (get > max) 28 if (get > max)
29 get = max; 29 get = max;
30 ret = read(state->fd, buf + *have, get); 30 ret = (int)read(state->fd, buf + *have, get);
31 if (ret <= 0) 31 if (ret <= 0)
32 break; 32 break;
33 *have += (unsigned)ret; 33 *have += (unsigned)ret;
diff --git a/gzwrite.c b/gzwrite.c
index acea74fe..18c820e2 100644
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -77,7 +77,7 @@ local int gz_comp(gz_statep state, int flush) {
77 errno = 0; 77 errno = 0;
78 state->again = 0; 78 state->again = 0;
79 put = strm->avail_in > max ? max : strm->avail_in; 79 put = strm->avail_in > max ? max : strm->avail_in;
80 writ = write(state->fd, strm->next_in, put); 80 writ = (int)write(state->fd, strm->next_in, put);
81 if (writ < 0) { 81 if (writ < 0) {
82 if (errno == EAGAIN || errno == EWOULDBLOCK) 82 if (errno == EAGAIN || errno == EWOULDBLOCK)
83 state->again = 1; 83 state->again = 1;
@@ -112,7 +112,7 @@ local int gz_comp(gz_statep state, int flush) {
112 state->again = 0; 112 state->again = 0;
113 put = strm->next_out - state->x.next > (int)max ? max : 113 put = strm->next_out - state->x.next > (int)max ? max :
114 (unsigned)(strm->next_out - state->x.next); 114 (unsigned)(strm->next_out - state->x.next);
115 writ = write(state->fd, state->x.next, put); 115 writ = (int)write(state->fd, state->x.next, put);
116 if (writ < 0) { 116 if (writ < 0) {
117 if (errno == EAGAIN || errno == EWOULDBLOCK) 117 if (errno == EAGAIN || errno == EWOULDBLOCK)
118 state->again = 1; 118 state->again = 1;