From: Ruben Kerkhof Date: Sun, 14 Aug 2016 17:51:34 +0000 (+0200) Subject: Python plugin: fix compiler warning X-Git-Tag: collectd-5.6.0~31 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1a9ccb9ef0d79a9f744daf9941447f944651bd60;p=collectd.git Python plugin: fix compiler warning python.c:397:25: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] for (size_t i = 0; i < num; ++i) { ~ ^ ~~~ --- diff --git a/src/python.c b/src/python.c index 884bb054..05a44aa8 100644 --- a/src/python.c +++ b/src/python.c @@ -389,12 +389,11 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li } dict = PyDict_New(); /* New reference. */ if (value_list->meta) { - int num; char **table; meta_data_t *meta = value_list->meta; - num = meta_data_toc(meta, &table); - for (size_t i = 0; i < num; ++i) { + int num = meta_data_toc(meta, &table); + for (int i = 0; i < num; ++i) { int type; char *string; int64_t si;