Update contrib/zip to fix data loss warning (#6152)

Without these changes, the warning "Type conversion may result in loss of data" might be triggered because `i` is of type `ssize_t` but the type of the parameter is `mz_uint` that is an alias for `unsinged int`.
This was already fixed in the original repository
see
d7a2252a53/src/zip.c (L481C49-L481C58)
and
d7a2252a53/src/zip.c (L538)

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
Xavier Bonaventura
2025-05-15 08:50:44 +02:00
committed by GitHub
parent 9d9a80739d
commit b40e41f9c3

View File

@@ -471,7 +471,7 @@ static ssize_t zip_entry_mark(struct zip_t *zip,
entry_mark[i].type = MZ_KEEP;
}
if (!mz_zip_reader_file_stat(&zip->archive, i, &file_stat)) {
if (!mz_zip_reader_file_stat(&zip->archive, (mz_uint)i, &file_stat)) {
return ZIP_ENOENT;
}
@@ -528,7 +528,7 @@ static ssize_t zip_entry_markbyindex(struct zip_t *zip,
entry_mark[i].type = MZ_KEEP;
}
if (!mz_zip_reader_file_stat(&zip->archive, i, &file_stat)) {
if (!mz_zip_reader_file_stat(&zip->archive, (mz_uint)i, &file_stat)) {
return ZIP_ENOENT;
}