From c4aa1d3762ad3465a247a581a79a7c9be18bd421 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Tue, 29 May 2018 11:25:10 +0200 Subject: [PATCH] ipmi plugin: fix sign compare warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CC src/ipmi_la-ipmi.lo src/ipmi.c: In function ‘sensor_unit_to_type’: src/ipmi.c:360:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] for (int i = 0; i < STATIC_ARRAY_SIZE(ipmi_db_type_map); i++) ^ --- src/ipmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipmi.c b/src/ipmi.c index 67fd949c..3037beb7 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -357,7 +357,7 @@ static const char *sensor_unit_to_type(ipmi_sensor_t *sensor) { /* find the db type by using sensor base unit type */ enum ipmi_unit_type_e ipmi_type = ipmi_sensor_get_base_unit(sensor); - for (int i = 0; i < STATIC_ARRAY_SIZE(ipmi_db_type_map); i++) + for (size_t i = 0; i < STATIC_ARRAY_SIZE(ipmi_db_type_map); i++) if (ipmi_db_type_map[i].type == ipmi_type) return ipmi_db_type_map[i].type_name; -- 2.11.0