From a2c13aaeec9412ac4cb2aac1a2cd7e0f725f79e0 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 5 Mar 2017 18:43:15 +0100 Subject: [PATCH] virt plugin: fix build warning CC src/virt_la-virt.lo src/virt.c:417:37: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if ((tag_index < 0) || (tag_index >= STATIC_ARRAY_SIZE(tags))) { ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. --- src/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virt.c b/src/virt.c index 692088c4..e95a31b4 100644 --- a/src/virt.c +++ b/src/virt.c @@ -414,7 +414,7 @@ static void memory_stats_submit(gauge_t value, virDomainPtr dom, "minor_fault", "unused", "available", "actual_balloon", "rss"}; - if ((tag_index < 0) || (tag_index >= STATIC_ARRAY_SIZE(tags))) { + if ((tag_index < 0) || (tag_index >= (int)STATIC_ARRAY_SIZE(tags))) { ERROR("virt plugin: Array index out of bounds: tag_index = %d", tag_index); return; } -- 2.30.2