summaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
authorPavel P <pavlov.pavel@gmail.com>2020-04-25 17:24:12 +0600
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-06-20 09:11:11 +0200
commit59e860cb44840eee43ca84422a5ee469d240def6 (patch)
treea0b58960a74ddae66fca90176bda63a9a43ead60 /gzlib.c
parentc4aab203deb2879fa5664cfbc8a1cc37a3cdcad2 (diff)
Fixed casting warnings
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gzlib.c b/gzlib.c
index 2443965..cef3606 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