From eb4022ee8fc6e7b5d2b9eceaf28753a3ffbd578d Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 7 Feb 2026 19:31:00 -0800 Subject: Make some down conversions explicit in the gz routines. --- gzread.c | 2 +- gzwrite.c | 4 ++-- 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, get = len - *have; if (get > max) get = max; - ret = read(state->fd, buf + *have, get); + ret = (int)read(state->fd, buf + *have, get); if (ret <= 0) break; *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) { errno = 0; state->again = 0; put = strm->avail_in > max ? max : strm->avail_in; - writ = write(state->fd, strm->next_in, put); + writ = (int)write(state->fd, strm->next_in, put); if (writ < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) state->again = 1; @@ -112,7 +112,7 @@ local int gz_comp(gz_statep state, int flush) { state->again = 0; put = strm->next_out - state->x.next > (int)max ? max : (unsigned)(strm->next_out - state->x.next); - writ = write(state->fd, state->x.next, put); + writ = (int)write(state->fd, state->x.next, put); if (writ < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) state->again = 1; -- cgit v1.2.3-55-g6feb