From a711e9c44dfc0c50dd1a05a8cf34d393093300b4 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Fri, 28 Jun 2019 10:58:56 -0600 Subject: payloads/coreinfo: Use correct integer types for loop indices Make sure that the type of the loop index matches the type of the upper bound. This fixes several -Wsign-compare warnings. Change-Id: I73a88355d86288609e03f7a6fcaec14dfedac203 Signed-off-by: Jacob Garber Reviewed-on: https://review.coreboot.org/c/coreboot/+/33863 Tested-by: build bot (Jenkins) Reviewed-by: HAOUAS Elyes --- payloads/coreinfo/coreboot_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/coreinfo/coreboot_module.c') diff --git a/payloads/coreinfo/coreboot_module.c b/payloads/coreinfo/coreboot_module.c index d294288cf7..66c258249c 100644 --- a/payloads/coreinfo/coreboot_module.c +++ b/payloads/coreinfo/coreboot_module.c @@ -195,7 +195,7 @@ static int parse_header(void *addr, int len) /* Now, walk the tables. */ ptr += header->header_bytes; - for (i = 0; i < header->table_entries; i++) { + for (u32 j = 0; j < header->table_entries; j++) { struct cb_record *rec = (struct cb_record *)ptr; switch (rec->tag) { -- cgit v1.2.3