From b2ebc33e877e32ad4e45aad97645fa8a263ab5ef Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 25 Feb 2025 13:12:33 +0900 Subject: [PATCH] Minor fixes Fix usage of "printf" functions due to a variable type changing from "size_t" to "uint64_t". --- src/archiver.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/archiver.c b/src/archiver.c index 33a0d8f..5a61b27 100644 --- a/src/archiver.c +++ b/src/archiver.c @@ -2802,8 +2802,8 @@ int simple_archiver_write_v1(FILE *out_f, SDArchiverState *state, } if (u32 != (uint32_t)symlinks_list->count) { fprintf(stderr, - "ERROR: Iterated through %" PRIu32 " symlinks out of %zu total!" - "\n", + "ERROR: Iterated through %" PRIu32 " symlinks out of %" PRIu64 + " total!\n", u32, symlinks_list->count); return SDAS_INTERNAL_ERROR; } @@ -2884,7 +2884,7 @@ int simple_archiver_write_v1(FILE *out_f, SDArchiverState *state, return SDAS_SIGINT; } fprintf(stderr, - "CHUNK %3" PRIu64 " of %3zu\n", + "CHUNK %3" PRIu64 " of %3" PRIu64 "\n", ++chunk_count, chunk_counts->count); // Write file count before iterating through files. @@ -3774,8 +3774,8 @@ int simple_archiver_write_v2(FILE *out_f, SDArchiverState *state, } if (u32 != (uint32_t)symlinks_list->count) { fprintf(stderr, - "ERROR: Iterated through %" PRIu32 " symlinks out of %zu total!" - "\n", + "ERROR: Iterated through %" PRIu32 " symlinks out of %" PRIu64 + " total!\n", u32, symlinks_list->count); return SDAS_INTERNAL_ERROR; } @@ -3861,7 +3861,7 @@ int simple_archiver_write_v2(FILE *out_f, SDArchiverState *state, return SDAS_SIGINT; } fprintf(stderr, - "CHUNK %3" PRIu64 " of %3zu\n", + "CHUNK %3" PRIu64 " of %3" PRIu64 "\n", ++chunk_count, chunk_counts->count); // Write file count before iterating through files. @@ -4919,8 +4919,8 @@ int simple_archiver_write_v3(FILE *out_f, SDArchiverState *state, } if (idx != (uint32_t)symlinks_list->count) { fprintf(stderr, - "ERROR: Iterated through %" PRIu32 " symlinks out of %zu total!" - "\n", + "ERROR: Iterated through %" PRIu32 " symlinks out of %" PRIu64 + " total!\n", idx, symlinks_list->count); return SDAS_INTERNAL_ERROR; } @@ -5006,7 +5006,7 @@ int simple_archiver_write_v3(FILE *out_f, SDArchiverState *state, return SDAS_SIGINT; } fprintf(stderr, - "CHUNK %3" PRIu64 " of %3zu\n", + "CHUNK %3" PRIu64 " of %3" PRIu64 "\n", ++chunk_count, chunk_counts->count); // Write file count before iterating through files. @@ -6196,7 +6196,7 @@ int simple_archiver_write_v4(FILE *out_f, SDArchiverState *state, return SDAS_SIGINT; } fprintf(stderr, - "CHUNK %3" PRIu64 " of %3zu\n", + "CHUNK %3" PRIu64 " of %3" PRIu64 "\n", ++chunk_count, chunk_counts->count); // Write file count before iterating through files. -- 2.49.0