updated minizip

This commit is contained in:
Antoine Cœur
2017-10-06 01:37:58 +08:00
parent f59a2d6670
commit 5a7f52bf50
6 changed files with 2014 additions and 2014 deletions
+8 -8
View File
@@ -35,7 +35,7 @@
# define IOMEM_BUFFERSIZE (UINT16_MAX)
#endif
voidpf ZCALLBACK fopen_mem_func(voidpf opaque, const char *filename, int mode)
voidpf ZCALLBACK fopen_mem_func(voidpf opaque, ZIP_UNUSED const char *filename, int mode)
{
ourmemory_t *mem = (ourmemory_t *)opaque;
if (mem == NULL)
@@ -59,13 +59,13 @@ voidpf ZCALLBACK fopen_mem_func(voidpf opaque, const char *filename, int mode)
return mem;
}
voidpf ZCALLBACK fopendisk_mem_func(voidpf opaque, voidpf stream, uint32_t number_disk, int mode)
voidpf ZCALLBACK fopendisk_mem_func(ZIP_UNUSED voidpf opaque, ZIP_UNUSED voidpf stream, ZIP_UNUSED uint32_t number_disk, ZIP_UNUSED int mode)
{
/* Not used */
return NULL;
}
uint32_t ZCALLBACK fread_mem_func(voidpf opaque, voidpf stream, void *buf, uint32_t size)
uint32_t ZCALLBACK fread_mem_func(ZIP_UNUSED voidpf opaque, voidpf stream, void *buf, uint32_t size)
{
ourmemory_t *mem = (ourmemory_t *)stream;
@@ -78,7 +78,7 @@ uint32_t ZCALLBACK fread_mem_func(voidpf opaque, voidpf stream, void *buf, uint3
return size;
}
uint32_t ZCALLBACK fwrite_mem_func(voidpf opaque, voidpf stream, const void *buf, uint32_t size)
uint32_t ZCALLBACK fwrite_mem_func(ZIP_UNUSED voidpf opaque, voidpf stream, const void *buf, uint32_t size)
{
ourmemory_t *mem = (ourmemory_t *)stream;
uint32_t newmemsize = 0;
@@ -110,13 +110,13 @@ uint32_t ZCALLBACK fwrite_mem_func(voidpf opaque, voidpf stream, const void *buf
return size;
}
long ZCALLBACK ftell_mem_func(voidpf opaque, voidpf stream)
long ZCALLBACK ftell_mem_func(ZIP_UNUSED voidpf opaque, voidpf stream)
{
ourmemory_t *mem = (ourmemory_t *)stream;
return mem->cur_offset;
}
long ZCALLBACK fseek_mem_func(voidpf opaque, voidpf stream, uint32_t offset, int origin)
long ZCALLBACK fseek_mem_func(ZIP_UNUSED voidpf opaque, voidpf stream, uint32_t offset, int origin)
{
ourmemory_t *mem = (ourmemory_t *)stream;
uint32_t new_pos = 0;
@@ -141,13 +141,13 @@ long ZCALLBACK fseek_mem_func(voidpf opaque, voidpf stream, uint32_t offset, int
return 0;
}
int ZCALLBACK fclose_mem_func(voidpf opaque, voidpf stream)
int ZCALLBACK fclose_mem_func(ZIP_UNUSED voidpf opaque, ZIP_UNUSED voidpf stream)
{
/* Even with grow = 1, caller must always free() memory */
return 0;
}
int ZCALLBACK ferror_mem_func(voidpf opaque, voidpf stream)
int ZCALLBACK ferror_mem_func(ZIP_UNUSED voidpf opaque, ZIP_UNUSED voidpf stream)
{
/* We never return errors */
return 0;