util/cbfstool: Change %lu to %zu for size_t argument

With commit 34a7e66faa ("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 <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70848
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
Reka Norman 2022-12-16 17:03:46 +11:00 committed by Martin L Roth
parent a1a8f58a07
commit f49fcc6bf5
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ static bool create_mmap_windows(void)
// No memory map provided, use a default one // No memory map provided, use a default one
if (mmap_window_table_size == 0) { if (mmap_window_table_size == 0) {
const size_t image_size = partitioned_file_total_size(param.image_file); 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_size = MIN(DEFAULT_DECODE_WINDOW_MAX_SIZE, image_size);
const size_t std_window_flash_offset = image_size - std_window_size; const size_t std_window_flash_offset = image_size - std_window_size;