From: Marek Behún Date: Fri, 24 Sep 2021 21:06:38 +0000 (+0200) Subject: tools: kwbimage: Fix printf format warning X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-favicon.png?a=commitdiff_plain;h=3b5da64edfdc013b105573a20871659d37ab53de;p=u-boot.git tools: kwbimage: Fix printf format warning 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 Reviewed-by: Stefan Roese --- 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;