[PATCH u-boot-marvell 08/29] tools: kwboot: Fix comparison of integers with different size

Marek Behún marek.behun at nic.cz
Wed Aug 25 15:46:13 CEST 2021


The compiler complains that we are comparing int with size_t when
compiled with -W.

Signed-off-by: Marek Behún <marek.behun at nic.cz>
---
 tools/kwboot.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/kwboot.c b/tools/kwboot.c
index 88353d19c0..3d9f73e697 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -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;
-- 
2.31.1



More information about the U-Boot mailing list