miniz.c: silenced some stupid watcom warnings

This commit is contained in:
Ozkan Sezer 2021-09-04 23:55:10 +03:00
parent ca051b3392
commit 169ec72d0e

View file

@ -1,4 +1,5 @@
#include "miniz.h" #include "miniz.h"
/************************************************************************** /**************************************************************************
* *
* Copyright 2013-2014 RAD Game Tools and Valve Software * Copyright 2013-2014 RAD Game Tools and Valve Software
@ -1246,18 +1247,18 @@ static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_uint flag
return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
/* Check for miniz's practical limits */ /* Check for miniz's practical limits */
if (zip64_cdir_total_entries > MZ_UINT32_MAX) if (zip64_cdir_total_entries > (mz_uint64)MZ_UINT32_MAX)
return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries; pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries;
if (zip64_cdir_total_entries_on_this_disk > MZ_UINT32_MAX) if (zip64_cdir_total_entries_on_this_disk > (mz_uint64)MZ_UINT32_MAX)
return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
cdir_entries_on_this_disk = (mz_uint32)zip64_cdir_total_entries_on_this_disk; cdir_entries_on_this_disk = (mz_uint32)zip64_cdir_total_entries_on_this_disk;
/* Check for miniz's current practical limits (sorry, this should be enough for millions of files) */ /* Check for miniz's current practical limits (sorry, this should be enough for millions of files) */
if (zip64_size_of_central_directory > MZ_UINT32_MAX) if (zip64_size_of_central_directory > (mz_uint64)MZ_UINT32_MAX)
return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE);
cdir_size = (mz_uint32)zip64_size_of_central_directory; cdir_size = (mz_uint32)zip64_size_of_central_directory;