From 70a34db6b78e0fe6cb3338e17db0737f2b0750a9 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 11 Feb 2022 13:14:52 +0200 Subject: [PATCH] fix for `./v -cstrict -cc gcc vlib/szip/szip_test.v` --- thirdparty/zip/zip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thirdparty/zip/zip.c b/thirdparty/zip/zip.c index 766a3bc67b..09121acd94 100644 --- a/thirdparty/zip/zip.c +++ b/thirdparty/zip/zip.c @@ -1155,6 +1155,9 @@ int zip_entry_close(struct zip_t *zip) { mz_uint8 *pExtra_data = NULL; mz_uint32 extra_size = 0; mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE]; + // + mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; + mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32; if (!zip) { // zip_t handler is not initialized @@ -1185,9 +1188,6 @@ int zip_entry_close(struct zip_t *zip) { mz_zip_time_t_to_dos_time(zip->entry.m_time, &dos_time, &dos_date); #endif - mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; - mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32; - MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID); MZ_WRITE_LE32(local_dir_footer + 4, zip->entry.uncomp_crc32); MZ_WRITE_LE64(local_dir_footer + 8, zip->entry.comp_size);