fixed clang warnings in gzread.c and gzwrite.c

This commit is contained in:
Przemyslaw Skibinski
2017-01-18 14:36:10 +01:00
parent c9512db301
commit c3a04deda2
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ local int gz_load(state, buf, len, have)
unsigned len;
unsigned *have;
{
int ret;
ssize_t ret;
unsigned get, max = ((unsigned)-1 >> 2) + 1;
*have = 0;
@@ -320,7 +320,7 @@ local z_size_t gz_read(state, buf, len)
/* set n to the maximum amount of len that fits in an unsigned int */
n = -1;
if (n > len)
n = len;
n = (unsigned)len;
/* first just try copying data from the output buffer */
if (state.state->x.have) {
@@ -401,7 +401,7 @@ int ZEXPORT gzread(file, buf, len)
}
/* read len or fewer bytes to buf */
len = gz_read(state, buf, len);
len = (unsigned)gz_read(state, buf, len);
/* check for an error */
if (len == 0 && state.state->err != Z_OK && state.state->err != Z_BUF_ERROR)
@@ -485,7 +485,7 @@ int ZEXPORT gzgetc(file)
}
/* nothing there -- try gz_read() */
ret = gz_read(state, buf, 1);
ret = (unsigned)gz_read(state, buf, 1);
return ret < 1 ? -1 : buf[0];
}