From ea854b0515d4615034d3167ac69edfb6d09ee3db Mon Sep 17 00:00:00 2001 From: uyjulian Date: Tue, 7 Jul 2020 23:54:12 -0500 Subject: [PATCH] Use standard format specifiers --- libarchive/archive_read_support_format_cab.c | 2 +- libarchive/archive_read_support_format_rar5.c | 4 ++-- libarchive/archive_read_support_format_zip.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libarchive/archive_read_support_format_cab.c b/libarchive/archive_read_support_format_cab.c index a6475308e..43738b537 100644 --- a/libarchive/archive_read_support_format_cab.c +++ b/libarchive/archive_read_support_format_cab.c @@ -1172,7 +1172,7 @@ cab_checksum_finish(struct archive_read *a) cfdata->memimage + CFDATA_cbData, l, cfdata->sum_calculated); if (cfdata->sum_calculated != cfdata->sum) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Checksum error CFDATA[%d] %x:%x in %d bytes", + "Checksum error CFDATA[%d] %" PRIx32 ":%" PRIx32 " in %d bytes", cab->entry_cffolder->cfdata_index -1, cfdata->sum, cfdata->sum_calculated, cfdata->compressed_size); diff --git a/libarchive/archive_read_support_format_rar5.c b/libarchive/archive_read_support_format_rar5.c index 7a308a8d8..d06c5f939 100644 --- a/libarchive/archive_read_support_format_rar5.c +++ b/libarchive/archive_read_support_format_rar5.c @@ -3831,7 +3831,7 @@ static int verify_checksums(struct archive_read* a) { DEBUG_CODE { printf("Checksum error: CRC32 " - "(was: %08x, expected: %08x)\n", + "(was: %08" PRIx32 ", expected: %08" PRIx32 ")\n", rar->file.calculated_crc32, rar->file.stored_crc32); } @@ -3845,7 +3845,7 @@ static int verify_checksums(struct archive_read* a) { } else { DEBUG_CODE { printf("Checksum OK: CRC32 " - "(%08x/%08x)\n", + "(%08" PRIx32 "/%08" PRIx32 ")\n", rar->file.stored_crc32, rar->file.calculated_crc32); } diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c index 6581ca0ac..24344b1db 100644 --- a/libarchive/archive_read_support_format_zip.c +++ b/libarchive/archive_read_support_format_zip.c @@ -1901,15 +1901,15 @@ zipx_ppmd8_init(struct archive_read *a, struct zip *zip) if(order < 2 || restore_method > 2) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Invalid parameter set in PPMd8 stream (order=%d, " - "restore=%d)", order, restore_method); + "Invalid parameter set in PPMd8 stream (order=%" PRId32 ", " + "restore=%" PRId32 ")", order, restore_method); return (ARCHIVE_FAILED); } /* Allocate the memory needed to properly decompress the file. */ if(!__archive_ppmd8_functions.Ppmd8_Alloc(&zip->ppmd8, mem << 20)) { archive_set_error(&a->archive, ENOMEM, - "Unable to allocate memory for PPMd8 stream: %d bytes", + "Unable to allocate memory for PPMd8 stream: %" PRId32 " bytes", mem << 20); return (ARCHIVE_FATAL); } -- 2.47.2