]> git.baikalelectronics.ru Git - uboot.git/commitdiff
tools: kwbimage: Fix printf format warning
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:06:38 +0000 (23:06 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
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@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c

index d200ff242508786c2e668713534cc4f611a51e9a..e72555fe7423e8acba0e1fae8271129c1e1ccd00 100644 (file)
@@ -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;