/* Update checksum */
if ((zip->entry->flg & CRC32_IS_SET) && bytes)
- zip->entry_crc32 = crc32(zip->entry_crc32, *buff, (uInt)bytes);
+ zip->entry_crc32 = crc32(zip->entry_crc32, *buff,
+ (unsigned)bytes);
/* If we hit the end, swallow any end-of-data marker. */
if (zip->end_of_entry) {
}
/* Update checksum */
- zip->header_crc32 = crc32(zip->header_crc32, p, (uInt)rbytes);
+ zip->header_crc32 = crc32(zip->header_crc32, p, (unsigned)rbytes);
return (p);
}
return (ARCHIVE_FATAL);
}
- crc32_val = crc32(0, (const unsigned char *)p + 2, (uInt)skip - 2);
+ crc32_val = crc32(0, (const unsigned char *)p + 2, (unsigned)skip - 2);
if ((crc32_val & 0xffff) != archive_le16dec(p)) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Header CRC error");
p = h;
}
- crc32_val = crc32(0, (const unsigned char *)p + 2, (uInt)skip - 2);
+ crc32_val = crc32(0, (const unsigned char *)p + 2, (unsigned)skip - 2);
if ((crc32_val & 0xffff) != archive_le16dec(p)) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Header CRC error");
rar->bytes_remaining -= bytes_avail;
rar->bytes_unconsumed = bytes_avail;
/* Calculate File CRC. */
- rar->crc_calculated = crc32(rar->crc_calculated, *buff, (uInt)bytes_avail);
+ rar->crc_calculated = crc32(rar->crc_calculated, *buff,
+ (unsigned)bytes_avail);
return (ARCHIVE_OK);
}
*offset = rar->offset_outgoing;
rar->offset_outgoing += *size;
/* Calculate File CRC. */
- rar->crc_calculated = crc32(rar->crc_calculated, *buff, (uInt)*size);
+ rar->crc_calculated = crc32(rar->crc_calculated, *buff,
+ (unsigned)*size);
rar->unp_offset = 0;
return (ARCHIVE_OK);
}
*offset = rar->offset_outgoing;
rar->offset_outgoing += *size;
/* Calculate File CRC. */
- rar->crc_calculated = crc32(rar->crc_calculated, *buff, (uInt)*size);
+ rar->crc_calculated = crc32(rar->crc_calculated, *buff,
+ (unsigned)*size);
return (ret);
}
continue;
*offset = rar->offset_outgoing;
rar->offset_outgoing += *size;
/* Calculate File CRC. */
- rar->crc_calculated = crc32(rar->crc_calculated, *buff, (uInt)*size);
+ rar->crc_calculated = crc32(rar->crc_calculated, *buff, (unsigned)*size);
return ret;
}
bytes = compress_out(a, p, (size_t)file->size, ARCHIVE_Z_RUN);
if (bytes < 0)
return ((int)bytes);
- zip->entry_crc32 = crc32(zip->entry_crc32, p, (uInt)bytes);
+ zip->entry_crc32 = crc32(zip->entry_crc32, p, (unsigned)bytes);
zip->entry_bytes_remaining -= bytes;
}
return (0);
if ((zip->crc32flg & PRECODE_CRC32) && s)
- zip->precode_crc32 = crc32(zip->precode_crc32, buff, (uInt)s);
+ zip->precode_crc32 = crc32(zip->precode_crc32, buff,
+ (unsigned)s);
zip->stream.next_in = (const unsigned char *)buff;
zip->stream.avail_in = s;
do {
bytes = compress_out(a, buff, s, ARCHIVE_Z_RUN);
if (bytes < 0)
return (bytes);
- zip->entry_crc32 = crc32(zip->entry_crc32, buff, (uInt)bytes);
+ zip->entry_crc32 = crc32(zip->entry_crc32, buff, (unsigned)bytes);
zip->entry_bytes_remaining -= bytes;
return (bytes);
}