[PATCH 1/1] tools: image-host.c: use correct output format

Tom Rini trini at konsulko.com
Fri Apr 24 19:11:19 CEST 2020

On Sat, Apr 11, 2020 at 06:36:04PM +0200, Heinrich Schuchardt wrote:

> When building on a 32bit host the following warning occurs:
> tools/image-host.c: In function ‘fit_image_read_data’:
> tools/image-host.c:310:42: warning: format ‘%ld’ expects argument of type
> ‘long int’, but argument 3 has type ‘ssize_t’ {aka ‘int’} [-Wformat=]
>    printf("Can't read all file %s (read %ld bytes, expexted %ld)\n",
>                                         ~~^
>                                         %d
>           filename, n, sbuf.st_size);
>                     ~
> n is of type ssize_t so we should use %zd for printing.
> Fixes: 7298e422504e ("mkimage: fit: add support to encrypt image with aes")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200424/7f0bea39/attachment.sig>

More information about the U-Boot mailing list