summaryrefslogtreecommitdiff
path: root/thirdparty/minizip/ioapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/minizip/ioapi.c')
-rw-r--r--thirdparty/minizip/ioapi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/thirdparty/minizip/ioapi.c b/thirdparty/minizip/ioapi.c
index db4c33b4b9..b50db35ac1 100644
--- a/thirdparty/minizip/ioapi.c
+++ b/thirdparty/minizip/ioapi.c
@@ -101,9 +101,9 @@ static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
{
- (void)opaque;
FILE* file = NULL;
const char* mode_fopen = NULL;
+ (void)opaque;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else
@@ -120,9 +120,9 @@ static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, in
static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
{
- (void)opaque;
FILE* file = NULL;
const char* mode_fopen = NULL;
+ (void)opaque;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else
@@ -140,24 +140,24 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename,
static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
{
- (void)opaque;
uLong ret;
+ (void)opaque;
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
{
- (void)opaque;
uLong ret;
+ (void)opaque;
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
{
- (void)opaque;
long ret;
+ (void)opaque;
ret = ftell((FILE *)stream);
return ret;
}
@@ -165,17 +165,17 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
{
- (void)opaque;
ZPOS64_T ret;
+ (void)opaque;
ret = (ZPOS64_T)FTELLO_FUNC((FILE *)stream);
return ret;
}
static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
{
- (void)opaque;
int fseek_origin=0;
long ret;
+ (void)opaque;
switch (origin)
{
case ZLIB_FILEFUNC_SEEK_CUR :
@@ -197,9 +197,9 @@ static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offs
static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
{
- (void)opaque;
int fseek_origin=0;
long ret;
+ (void)opaque;
switch (origin)
{
case ZLIB_FILEFUNC_SEEK_CUR :
@@ -215,7 +215,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
}
ret = 0;
- if(FSEEKO_FUNC((FILE *)stream, (long)offset, fseek_origin) != 0)
+ if(FSEEKO_FUNC((FILE *)stream, (z_off_t)offset, fseek_origin) != 0)
ret = -1;
return ret;
@@ -224,16 +224,16 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
{
- (void)opaque;
int ret;
+ (void)opaque;
ret = fclose((FILE *)stream);
return ret;
}
static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
{
- (void)opaque;
int ret;
+ (void)opaque;
ret = ferror((FILE *)stream);
return ret;
}