Skip to content

Commit ece05ff

Browse files
halx99minggo
authored andcommitted
Fix compile error & warning for xcode. (#378)
* Upgrade minizip to 1.2.0 * Fix compile error & warning for xcode.
1 parent d3e154f commit ece05ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

unzip/crypt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static uint8_t update_keys(uint32_t *pkeys, const z_crc_t *pcrc_32_tab, int32_t
6565
(*(pkeys + 1)) += (*(pkeys + 0)) & 0xff;
6666
(*(pkeys + 1)) = (*(pkeys + 1)) * 134775813L + 1;
6767
{
68-
register int32_t keyshift = (int32_t)((*(pkeys + 1)) >> 24);
68+
int32_t keyshift = (int32_t)((*(pkeys + 1)) >> 24);
6969
(*(pkeys + 2)) = (uint32_t)CRC32((*(pkeys + 2)), keyshift);
7070
}
7171
return c;

unzip/unzip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ extern unzFile ZEXPORT unzOpen64(const void *path)
537537
extern unzFile ZEXPORT unzOpenBuffer(const void* buffer, uLong size)
538538
{
539539
zlib_filefunc_def memory_file = { 0 };
540-
ourmemory_s oms = { (char*)(buffer), size, size, 0, 0};
540+
ourmemory_s oms = { (char*)const_cast<void*>(buffer), static_cast<uint32_t>(size), 0, 0, 0};
541541
fill_memory_filefunc(&memory_file, &oms);
542542
return unzOpen2(nullptr, &memory_file);
543543
}

0 commit comments

Comments
 (0)