]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: mkeficapsule: use %zd to print ssize_t.
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 3 Nov 2024 22:45:05 +0000 (23:45 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 9 Nov 2024 08:56:45 +0000 (09:56 +0100)
For printing a ssize_t variable we must use %zd and not %ld to avoid
a -Wformat error on 32-bit systems.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
tools/mkeficapsule.c

index 49f5b7849e48f2fdcf3c2238ac1fe7163a5e6ea4..fb6c57f77c1deca40f531f3129e7a61835fa0a6b 100644 (file)
@@ -866,12 +866,12 @@ static struct fdt_header *load_dtb(const char *path)
 
        dtb = malloc(dtb_size);
        if (!dtb) {
-               fprintf(stderr, "Can't allocated %ld\n", dtb_size);
+               fprintf(stderr, "Can't allocated %zd\n", dtb_size);
                return NULL;
        }
 
        if (fread(dtb, dtb_size, 1, f) != 1) {
-               fprintf(stderr, "Can't read %ld bytes from %s\n",
+               fprintf(stderr, "Can't read %zd bytes from %s\n",
                        dtb_size, path);
                free(dtb);
                return NULL;