[PATCH u-boot-marvell v3 01/39] tools: kwbimage: Fix printf format warning
Stefan Roese
sr at denx.de
Fri Oct 1 08:00:35 CEST 2021
On 24.09.21 23:06, Marek Behún wrote:
> From: Marek Behún <marek.behun at nic.cz>
>
> On 32-bit ARM the compiler complains:
> tools/kwbimage.c:547: warning: format ‘%lu’ expects argument of type
> ‘long unsigned int’, but argument 4 has
> type ‘unsigned int’
>
> Fix this by using %zu instead of %lu format specifier.
>
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
Reviewed-by: Stefan Roese <sr at denx.de>
Thanks,
Stefan
> ---
> tools/kwbimage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/kwbimage.c b/tools/kwbimage.c
> index d200ff2425..e72555fe74 100644
> --- a/tools/kwbimage.c
> +++ b/tools/kwbimage.c
> @@ -542,7 +542,7 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf,
> }
>
> if (4 + size_seq > sizeof(dst->key)) {
> - fprintf(stderr, "export pk failed: seq too large (%d, %lu)\n",
> + fprintf(stderr, "export pk failed: seq too large (%d, %zu)\n",
> 4 + size_seq, sizeof(dst->key));
> fprintf(stderr, errmsg, keyname);
> return -ENOBUFS;
>
Viele Grüße,
Stefan
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
More information about the U-Boot
mailing list