From: Pavel P Date: Sat, 25 Apr 2020 11:24:12 +0000 (+0600) Subject: Fixed casting warnings X-Git-Tag: 1.9.9-b1~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59e860cb44840eee43ca84422a5ee469d240def6;p=thirdparty%2Fzlib-ng.git Fixed casting warnings --- diff --git a/deflate.c b/deflate.c index 9494c9573..1d1cf5bc9 100644 --- a/deflate.c +++ b/deflate.c @@ -1058,7 +1058,7 @@ int32_t ZEXPORT PREFIX(deflate)(PREFIX3(stream) *strm, int32_t flush) { crc_finalize(s); # endif put_uint32(s, strm->adler); - put_uint32(s, strm->total_in); + put_uint32(s, (uint32_t)strm->total_in); } else #endif { diff --git a/gzlib.c b/gzlib.c index 244396543..cef3606f0 100644 --- a/gzlib.c +++ b/gzlib.c @@ -136,7 +136,7 @@ static gzFile gz_open(const void *path, int fd, const char *mode) { /* save the path name for error messages */ #ifdef WIDECHAR if (fd == -2) { - len = wcstombs(NULL, path, 0); + len = wcstombs(NULL, (const wchar_t *)path, 0); if (len == (size_t)-1) len = 0; } else @@ -150,7 +150,7 @@ static gzFile gz_open(const void *path, int fd, const char *mode) { #ifdef WIDECHAR if (fd == -2) if (len) { - wcstombs(state->path, path, len + 1); + wcstombs(state->path, (const wchar_t *)path, len + 1); } else { *(state->path) = 0; } @@ -182,7 +182,7 @@ static gzFile gz_open(const void *path, int fd, const char *mode) { /* open the file with the appropriate flags (or just use fd) */ state->fd = fd > -1 ? fd : ( #if defined(_WIN32) - fd == -2 ? _wopen(path, oflag, 0666) : + fd == -2 ? _wopen((const wchar_t *)path, oflag, 0666) : #elif __CYGWIN__ fd == -2 ? open(state->path, oflag, 0666) : #endif