]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: kwboot: Fix comparison of integers with different size
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:06:45 +0000 (23:06 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
The compiler complains that we are comparing int with size_t when
compiled with -W.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwboot.c

index 88353d19c0eba032716add24ae55f4ebe1e58149..3d9f73e697e0502520136590d66d24596b6df5bb 100644 (file)
@@ -352,8 +352,7 @@ kwboot_xm_makeblock(struct kwboot_block *block, const void *data,
                    size_t size, int pnum)
 {
        const size_t blksz = sizeof(block->data);
-       size_t n;
-       int i;
+       size_t i, n;
 
        block->soh = SOH;
        block->pnum = pnum;