mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
tools: image-host.c: use correct output format
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: 7298e42250
("mkimage: fit: add support to encrypt image with aes")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0053d26bcc
commit
b21c08a12b
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ static int fit_image_read_data(char *filename, unsigned char *data,
|
|||
|
||||
/* Check that we have read all the file */
|
||||
if (n != sbuf.st_size) {
|
||||
printf("Can't read all file %s (read %ld bytes, expexted %ld)\n",
|
||||
printf("Can't read all file %s (read %zd bytes, expexted %ld)\n",
|
||||
filename, n, sbuf.st_size);
|
||||
goto err;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue