From 8a103937ee6bce58ae4c6564ba3a44caf4a0e5a2 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Wed, 23 May 2018 15:39:23 +0200 Subject: [PATCH] table plugin: fix build warning src/table.c:399:11: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if (r >= sizeof(vl.type_instance)) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. --- src/table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/table.c b/src/table.c index ae26c789..189d6057 100644 --- a/src/table.c +++ b/src/table.c @@ -396,7 +396,7 @@ static int tbl_result_dispatch(tbl_t *tbl, tbl_result_t *res, char **fields, else r = snprintf(vl.type_instance, sizeof(vl.type_instance), "%s-%s", res->instance_prefix, instances_str); - if (r >= sizeof(vl.type_instance)) + if ((size_t)r >= sizeof(vl.type_instance)) log_warn("Truncated type instance: %s.", vl.type_instance); } -- 2.11.0