Commit eb4022e for zlib
commit eb4022ee8fc6e7b5d2b9eceaf28753a3ffbd578d
Author: Mark Adler <git@madler.net>
Date: Sat Feb 7 19:31:00 2026 -0800
Make some down conversions explicit in the gz routines.
diff --git a/gzread.c b/gzread.c
index 52a5019..b198a44 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 acea74f..18c820e 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;