Skip to content
Snippets Groups Projects
Commit 923de765 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt :speech_balloon: Committed by Tom Rini
Browse files

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: afdfcb11 ("tools: spkgimage: add Renesas SPKG format")
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarMarek Vasut <marek.vasut+renesas@mailbox.org>
parent 92be5e4f
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ static int spkgimage_parse_config_line(char *line, size_t line_num)
conf.padding = check_range(name, value, 1, INT_MAX);
} else {
fprintf(stderr,
"config error: unknown keyword on line %ld\n",
"config error: unknown keyword on line %zu\n",
line_num);
return -EINVAL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment