From: Hugo Villeneuve Date: Tue, 4 Nov 2025 20:20:15 +0000 (-0500) Subject: tlv_eeprom: fix comparison of integer expressions of different signedness X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=158b30a2d472e8fed6bcfafe67b903293f0744a1;p=mtlv.git tlv_eeprom: fix comparison of integer expressions of different signedness 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 --- 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");