tools: image-host.c: use correct output format 26/248726/1
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 8 Oct 2020 18:51:24 +0000 (20:51 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 2 Dec 2020 00:54:40 +0000 (09:54 +0900)
commit6534fc6d65f6681f6e286b22d0c0f4dec49e813d
tree49f58cb052f7b2a0ddee18784865678acd812173
parent4e14354dcb8451bbc4e5264afe24f7052bc5e6ab
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:296:56: warning: format ‘%ld’ expects argument of
type ‘long int’, but argument 3 has type ‘__off64_t’
{aka ‘long long int’} [-Wformat=]
   printf("File %s don't have the expected size (size=%ld, expected=%d)\n",
                                                      ~~^
                                                      %lld
          filename, sbuf.st_size, expected_size);
                    ~~~~~~~~~~~~
tools/image-host.c:311:62: warning: format ‘%ld’ expects argument of
type ‘long int’, but argument 4 has type ‘__off64_t’
{aka ‘long long int’} [-Wformat=]
   printf("Can't read all file %s (read %zd bytes, expexted %ld)\n",
                                                            ~~^
                                                            %lld
          filename, n, sbuf.st_size);
                       ~~~~~~~~~~~~

Fix the format strings.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[jh80.chung: cherry picked from mainline commit 3311eda658e0]
Change-Id: I5ed82a5c3d876a56d6b9ac75598eeed2d2b85d2a
tools/image-host.c