From f49fcc6bf5ced406ce614ff8cc4dd7f172b38d65 Mon Sep 17 00:00:00 2001 From: Reka Norman Date: Fri, 16 Dec 2022 17:03:46 +1100 Subject: util/cbfstool: Change %lu to %zu for size_t argument With commit 34a7e66faa46 ("util/cbfstool: Add a new mechanism to provide a memory map"), builds are failing on 32-bit platforms with: ../cbfstool/cbfstool.c:397:30: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] printf("Image SIZE %lu\n", image_size); ~~~ ^~~~~~~~~~ %zu Change the format specifier from %lu to %zu. TEST=`emerge-cherry coreboot-utils` now succeeds Change-Id: I3602f57cf91c330122019bfa921faef6deb2b4ce Signed-off-by: Reka Norman Reviewed-on: https://review.coreboot.org/c/coreboot/+/70848 Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Paul Menzel --- util/cbfstool/cbfstool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index c6e451fec2..a883ddafab 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -394,7 +394,7 @@ static bool create_mmap_windows(void) // No memory map provided, use a default one if (mmap_window_table_size == 0) { const size_t image_size = partitioned_file_total_size(param.image_file); - printf("Image SIZE %lu\n", image_size); + printf("Image SIZE %zu\n", image_size); const size_t std_window_size = MIN(DEFAULT_DECODE_WINDOW_MAX_SIZE, image_size); const size_t std_window_flash_offset = image_size - std_window_size; -- cgit v1.2.3