tools: kwbimage: Fix printf format warning 52/276552/1 accepted/tizen/unified/20220622.133923 submit/tizen/20220622.023017
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:06:38 +0000 (23:06 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 20 Jun 2022 09:41:06 +0000 (18:41 +0900)
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>
[jh80.chung: cherry picked from mainline commit 3b5da64edfdc013b105573a20871659d37ab53de]

Change-Id: I058d4395fd8e6cab5ee593974173f97929ec6a55
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
tools/kwbimage.c

index d200ff2..e72555f 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;