mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Fix compile warnings
This commit is contained in:
		| @@ -947,11 +947,12 @@ mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_ | |||||||
| mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename, mz_uint flags, mz_uint64 file_start_ofs, mz_uint64 archive_size) | mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename, mz_uint flags, mz_uint64 file_start_ofs, mz_uint64 archive_size) | ||||||
| { | { | ||||||
| 	mz_uint64 file_size; | 	mz_uint64 file_size; | ||||||
|  | 	MZ_FILE *pFile; | ||||||
|  |  | ||||||
|     if ((!pZip) || (!pFilename) || ((archive_size) && (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) |     if ((!pZip) || (!pFilename) || ((archive_size) && (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) | ||||||
|         return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); |         return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); | ||||||
|  |  | ||||||
|     MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb"); | 	pFile = MZ_FOPEN(pFilename, "rb"); | ||||||
|     if (!pFile) |     if (!pFile) | ||||||
|         return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); |         return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); | ||||||
|  |  | ||||||
| @@ -3335,6 +3336,7 @@ mz_bool mz_zip_writer_add_cfile(mz_zip_archive *pZip, const char *pArchive_name, | |||||||
|         pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); |         pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | 	{ | ||||||
| 		mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; | 		mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; | ||||||
| 		mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32; | 		mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32; | ||||||
|  |  | ||||||
| @@ -3359,6 +3361,7 @@ mz_bool mz_zip_writer_add_cfile(mz_zip_archive *pZip, const char *pArchive_name, | |||||||
| 			return MZ_FALSE; | 			return MZ_FALSE; | ||||||
|  |  | ||||||
| 		cur_archive_file_ofs += local_dir_footer_size; | 		cur_archive_file_ofs += local_dir_footer_size; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|     if (pExtra_data != NULL) |     if (pExtra_data != NULL) | ||||||
|     { |     { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user