diff options
| author | Mark Adler <git@madler.net> | 2026-02-07 19:31:00 -0800 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-02-07 22:30:17 -0800 |
| commit | eb4022ee8fc6e7b5d2b9eceaf28753a3ffbd578d (patch) | |
| tree | 99cd7bdf9be661087e4e9e77ab36a8c73b90081c | |
| parent | 9b337785de3c565a056bfa9780d76542003e55db (diff) | |
| download | zlib-eb4022ee8fc6e7b5d2b9eceaf28753a3ffbd578d.tar.gz zlib-eb4022ee8fc6e7b5d2b9eceaf28753a3ffbd578d.tar.bz2 zlib-eb4022ee8fc6e7b5d2b9eceaf28753a3ffbd578d.zip | |
Make some down conversions explicit in the gz routines.
| -rw-r--r-- | gzread.c | 2 | ||||
| -rw-r--r-- | gzwrite.c | 4 |
2 files changed, 3 insertions, 3 deletions
| @@ -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; |
| @@ -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; |
