summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.c
diff options
context:
space:
mode:
authorReka Norman <rekanorman@google.com>2022-12-16 17:03:46 +1100
committerMartin L Roth <gaumless@gmail.com>2022-12-17 20:41:14 +0000
commitf49fcc6bf5ced406ce614ff8cc4dd7f172b38d65 (patch)
tree3dd5fe2123c65cfb23902d0832e81ad23c661118 /util/cbfstool/cbfstool.c
parenta1a8f58a0713dad8bc621daf180790504b897dda (diff)
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 <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>
Diffstat (limited to 'util/cbfstool/cbfstool.c')
-rw-r--r--util/cbfstool/cbfstool.c2
1 files changed, 1 insertions, 1 deletions
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;