summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bbfa295)
raw | patch | inline | side by side (parent: bbfa295)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 7 Jul 2017 14:00:48 +0000 (16:00 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 7 Jul 2017 14:00:48 +0000 (16:00 +0200) |
make all-am
make[1]: Entering directory '/home/ruben/src/collectd'
CC src/snmp_agent_la-snmp_agent.lo
In file included from ./src/daemon/common.h:33:0,
from src/snmp_agent.c:31:
src/snmp_agent.c: In function ‘snmp_agent_dump_data’:
src/snmp_agent.c:42:21: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
#define PLUGIN_NAME "snmp_agent"
^
./src/daemon/plugin.h:400:42: note: in definition of macro ‘DEBUG’
#define DEBUG(...) plugin_log(LOG_DEBUG, __VA_ARGS__)
^~~~~~~~~~~
src/snmp_agent.c:192:13: note: in expansion of macro ‘PLUGIN_NAME’
DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
^~~~~~~~~~~
src/snmp_agent.c:192:35: note: format string is defined here
DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
~^
%ld
CCLD snmp_agent.la
make[1]: Entering directory '/home/ruben/src/collectd'
CC src/snmp_agent_la-snmp_agent.lo
In file included from ./src/daemon/common.h:33:0,
from src/snmp_agent.c:31:
src/snmp_agent.c: In function ‘snmp_agent_dump_data’:
src/snmp_agent.c:42:21: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
#define PLUGIN_NAME "snmp_agent"
^
./src/daemon/plugin.h:400:42: note: in definition of macro ‘DEBUG’
#define DEBUG(...) plugin_log(LOG_DEBUG, __VA_ARGS__)
^~~~~~~~~~~
src/snmp_agent.c:192:13: note: in expansion of macro ‘PLUGIN_NAME’
DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
^~~~~~~~~~~
src/snmp_agent.c:192:35: note: format string is defined here
DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
~^
%ld
CCLD snmp_agent.la
src/snmp_agent.c | patch | blob | history |
diff --git a/src/snmp_agent.c b/src/snmp_agent.c
index d7aea2d27075bb8427df57b62560ca4df9d634b8..0908b4eb8449c920b9686e53b7247b2c1e04ad7a 100644 (file)
--- a/src/snmp_agent.c
+++ b/src/snmp_agent.c
DEBUG(PLUGIN_NAME ": TypeInstance: %s", dd->type_instance);
for (size_t i = 0; i < dd->oids_len; i++) {
snmp_agent_oid_to_string(oid_str, sizeof(oid_str), &dd->oids[i]);
- DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
+ DEBUG(PLUGIN_NAME ": OID[%zu]: %s", i, oid_str);
}
DEBUG(PLUGIN_NAME ": Scale: %g", dd->scale);
DEBUG(PLUGIN_NAME ": Shift: %g", dd->shift);
DEBUG(PLUGIN_NAME ": TypeInstance: %s", dd->type_instance);
for (size_t i = 0; i < dd->oids_len; i++) {
snmp_agent_oid_to_string(oid_str, sizeof(oid_str), &dd->oids[i]);
- DEBUG(PLUGIN_NAME ": OID[%d]: %s", i, oid_str);
+ DEBUG(PLUGIN_NAME ": OID[%zu]: %s", i, oid_str);
}
DEBUG(PLUGIN_NAME ": Scale: %g", dd->scale);
DEBUG(PLUGIN_NAME ": Shift: %g", dd->shift);