From 158b30a2d472e8fed6bcfafe67b903293f0744a1 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 4 Nov 2025 15:20:15 -0500 Subject: [PATCH] tlv_eeprom: fix comparison of integer expressions of different signedness MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes the following warnings: tlv_eeprom.c:246:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 246 | for (i = 0; i < ARRAY_SIZE(tlv_code_list); i++) { | ^ Signed-off-by: Hugo Villeneuve --- src/tlv_eeprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tlv_eeprom.c b/src/tlv_eeprom.c index 3127660..491b77a 100644 --- a/src/tlv_eeprom.c +++ b/src/tlv_eeprom.c @@ -244,7 +244,7 @@ static struct tlv_code_desc tlv_code_list[] = { static inline const char *tlv_type2name(u8 type) { char *name = "Unknown"; - int i; + unsigned int i; for (i = 0; i < ARRAY_SIZE(tlv_code_list); i++) { if (tlv_code_list[i].m_code == type) { @@ -405,7 +405,7 @@ static int prog_eeprom(int devnum, u8 *eeprom) */ void show_tlv_code_list(void) { - int i; + unsigned int i; printf("TLV Code TLV Name\n"); printf("======== =================\n"); -- 2.20.1