From: Ruben Kerkhof Date: Tue, 29 May 2018 16:22:01 +0000 (+0200) Subject: intel_rdt: fix format specifier X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9857bf501eac1601a40582e58c05da1f20f613dd;p=collectd.git intel_rdt: fix format specifier Fixes build on F-26: src/intel_rdt.c: In function 'rdt_dump_cgroups': src/intel_rdt.c:34:20: error: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=] #define RDT_PLUGIN "intel_rdt" ^ ./src/daemon/plugin.h:396:42: note: in definition of macro 'DEBUG' #define DEBUG(...) plugin_log(LOG_DEBUG, __VA_ARGS__) ^~~~~~~~~~~ src/intel_rdt.c:79:11: note: in expansion of macro 'RDT_PLUGIN' DEBUG(RDT_PLUGIN ": group[%d]:", i); ^~~~~~~~~~ src/intel_rdt.c:79:33: note: format string is defined here DEBUG(RDT_PLUGIN ": group[%d]:", i); ~^ %ld --- diff --git a/src/intel_rdt.c b/src/intel_rdt.c index 347835c1..667033c0 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -76,7 +76,7 @@ static void rdt_dump_cgroups(void) { cgroup->cores[j]); } - DEBUG(RDT_PLUGIN ": group[%d]:", i); + DEBUG(RDT_PLUGIN ": group[%zu]:", i); DEBUG(RDT_PLUGIN ": description: %s", cgroup->desc); DEBUG(RDT_PLUGIN ": cores: %s", cores); DEBUG(RDT_PLUGIN ": events: 0x%X", g_rdt->events[i]);