]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: spkgimage: correct printf specifier
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 4 Jul 2023 20:18:09 +0000 (22:18 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 5 Jul 2023 20:14:54 +0000 (16:14 -0400)
commit923de765ee1a5b26310f02cb42dcbad9e2b011c5
tree8b78340357f1f1867c432d670a94c5749d4b0426
parent92be5e4f74130f704357b8f96d62ae92eb79a2f2
tools: spkgimage: correct printf specifier

Compiling on armv7 results in:

tools/renesas_spkgimage.c: In function ‘spkgimage_parse_config_line’:
tools/renesas_spkgimage.c:76:66: warning: format ‘%ld’ expects
argument of type ‘long int’, but argument 3 has type ‘size_t’
{aka ‘unsigned int’} [-Wformat=]
   76 |         "config error: unknown keyword on line %ld\n",
      |                                                ~~^
      |                                                  |
      |                                                  long int
      |                                                %d
   77 |         line_num);
      |         ~~~~~~~~
      |         |
      |         size_t {aka unsigned int}

The correct printf specifier for size_t is '%zu'.

Fixes: afdfcb11f97c ("tools: spkgimage: add Renesas SPKG format")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
tools/renesas_spkgimage.c