]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
tools: fix format string in tools/imx8image.c
authorMilan P. Stanić <mps@arvanta.net>
Mon, 12 Jan 2026 18:12:37 +0000 (19:12 +0100)
committerFabio Estevam <festevam@nabladev.com>
Sat, 17 Jan 2026 18:01:00 +0000 (15:01 -0300)
on 32bit systems with musl libc compiler emits
warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]

to fix this use format length modifier 'z' (size_t) instead of 'l'

Signed-off-by: Milan P. Stanić <mps@arvanta.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
tools/imx8image.c

index 3cea536b8e88d18e36661cfa6c0f03686ba7061b..84f46bcaf3719e6dfb561f6453eb8c4928d1e52d 100644 (file)
@@ -815,7 +815,7 @@ static int get_container_image_start_pos(image_t *image_stack, uint32_t align, u
 
        p = calloc(1, size);
        if (!p) {
-               fprintf(stderr, "Fail to alloc %lx memory\n", size);
+               fprintf(stderr, "Fail to alloc %zx memory\n", size);
                exit(EXIT_FAILURE);
        }