]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd/ubi.c: Fix format warning
authorTom Rini <trini@konsulko.com>
Thu, 26 Jul 2018 15:17:24 +0000 (11:17 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 26 Jul 2018 15:43:30 +0000 (11:43 -0400)
On 64bit platforms we would otherwise see:
../cmd/ubi.c: In function 'ubi_volume_read':
../cmd/ubi.c:359:16: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]

Fixes: 68c7025d99db ("cmd: ubi: print load size after establishing volume size")
Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/ubi.c

index 0e935e34b8e626fb5ec916109ae013aee07e3048..913f0f71fd99b83dab958bc5620e62a1af3c6487 100644 (file)
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -356,7 +356,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
                size = vol->used_bytes;
        }
 
-       printf("Read %u bytes from volume %s to %p\n", size, volume, buf);
+       printf("Read %zu bytes from volume %s to %p\n", size, volume, buf);
 
        if (vol->corrupted)
                printf("read from corrupted volume %d", vol->vol_id);