From 50ecbd76174f3668d7b76ac7116f432bf64f71bd Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Wed, 20 Feb 2019 11:19:16 +0100 Subject: [PATCH] ovs_stats plugin: fix compiler warning src/ovs_stats.c:863:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] for (int i = 0; i < YAJL_GET_ARRAY(ifaces_list)->len; i++) { ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. --- src/ovs_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ovs_stats.c b/src/ovs_stats.c index fe1953f2..da218b6f 100644 --- a/src/ovs_stats.c +++ b/src/ovs_stats.c @@ -860,7 +860,7 @@ static int ovs_stats_update_port(const char *uuid, yajl_val port) { // ifaces_list is [[ "uuid", "" ], [ "uuid", // "" ], ... ]] - for (int i = 0; i < YAJL_GET_ARRAY(ifaces_list)->len; i++) { + for (size_t i = 0; i < YAJL_GET_ARRAY(ifaces_list)->len; i++) { yajl_val iface_tuple = YAJL_GET_ARRAY(ifaces_list)->values[i]; // iface_tuple is [ "uuid", "" ] -- 2.11.0