From d3de7968bc7b608e70b090bd838eeaf4ea7d1913 Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 26 Jul 2022 20:40:57 +0200 Subject: display-name: fix -Wsign-compare warning --- libmate-desktop/display-name.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmate-desktop/display-name.c b/libmate-desktop/display-name.c index d9eea2d..515d20f 100644 --- a/libmate-desktop/display-name.c +++ b/libmate-desktop/display-name.c @@ -226,7 +226,7 @@ static void read_pnp_ids(void) static const char* find_vendor(const char* code) { const char* vendor_name; - int i; + gsize i; read_pnp_ids(); @@ -235,7 +235,7 @@ static const char* find_vendor(const char* code) if (vendor_name) return vendor_name; - for (i = 0; i < sizeof(vendors) / sizeof(vendors[0]); ++i) + for (i = 0; i < G_N_ELEMENTS (vendors); ++i) { const Vendor* v = &(vendors[i]); -- cgit v1.2.1