diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-18 13:48:17 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-18 16:23:48 +0100 |
commit | 3843ff0f632ff6a790d49b4895d7fefc1cd385ca (patch) | |
tree | 2c5afeb661e3f9d234fc0f2ce1b10268e55c76f1 /lib | |
parent | e438d7f1b37f2d8b29ae028b15f95442e48dd9e7 (diff) |
Convert the remaining size_t printf format specifiers in libcommon
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/comp_opt.c | 4 | ||||
-rw-r--r-- | lib/common/statistics.c | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/lib/common/comp_opt.c b/lib/common/comp_opt.c index 2b92da3..f257036 100644 --- a/lib/common/comp_opt.c +++ b/lib/common/comp_opt.c @@ -255,8 +255,8 @@ fail_window: return -1; fail_level: fprintf(stderr, - "Compression level must be a number between %zu and %zu.\n", - min_level, max_level); + "Compression level must be a number between " PRI_SZ " and " + PRI_SZ ".\n", min_level, max_level); return -1; fail_opt: fprintf(stderr, "Unknown compressor option '%s'.\n", value); diff --git a/lib/common/statistics.c b/lib/common/statistics.c index a209461..7bf8fca 100644 --- a/lib/common/statistics.c +++ b/lib/common/statistics.c @@ -75,14 +75,17 @@ void sqfs_print_statistics(sqfs_super_t *super, data_writer_stats_t *stats) } fputs("---------------------------------------------------\n", stdout); - printf("Input files processed: %zu\n", stats->file_count); - printf("Data blocks actually written: %zu\n", stats->blocks_written); - printf("Fragment blocks written: %zu\n", stats->frag_blocks_written); - printf("Duplicate data blocks omitted: %zu\n", stats->duplicate_blocks); - printf("Sparse blocks omitted: %zu\n", stats->sparse_blocks); - printf("Fragments actually written: %zu\n", stats->frag_count); - printf("Duplicated fragments omitted: %zu\n", stats->frag_dup); + printf("Input files processed: " PRI_SZ"\n", stats->file_count); + printf("Data blocks actually written: " PRI_SZ "\n", + stats->blocks_written); + printf("Fragment blocks written: " PRI_SZ "\n", + stats->frag_blocks_written); + printf("Duplicate data blocks omitted: " PRI_SZ "\n", + stats->duplicate_blocks); + printf("Sparse blocks omitted: " PRI_SZ "\n", stats->sparse_blocks); + printf("Fragments actually written: " PRI_SZ "\n", stats->frag_count); + printf("Duplicated fragments omitted: " PRI_SZ"\n", stats->frag_dup); printf("Total number of inodes: %u\n", super->inode_count); printf("Number of unique group/user IDs: %u\n", super->id_count); - printf("Data compression ratio: %zu%%\n", ratio); + printf("Data compression ratio: " PRI_SZ "%%\n", ratio); } |