summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eea01a8)
raw | patch | inline | side by side (parent: eea01a8)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 14 Apr 2015 16:48:07 +0000 (18:48 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 15 Apr 2015 08:37:46 +0000 (10:37 +0200) |
The default CC on freebsd-10 (clang 3.4) spotted these issues:
write_sensu.c:494:38: error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Werror,-Wformat]
write_sensu.c:494:45: error: data argument not used by format string [-Werror,-Wformat-extra-args]
write_sensu.c:494:38: error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Werror,-Wformat]
write_sensu.c:494:45: error: data argument not used by format string [-Werror,-Wformat-extra-args]
src/write_sensu.c | patch | blob | history |
diff --git a/src/write_sensu.c b/src/write_sensu.c
index aef97e5bf2e37c3d450b8f13c38f6229c3b30b26..35db4f7b77ec009c7926674ef8b33c50d08593ca 100644 (file)
--- a/src/write_sensu.c
+++ b/src/write_sensu.c
// calculate the value and set to a string
if (ds->ds[index].type == DS_TYPE_GAUGE) {
double tmp_v = (double) vl->values[index].gauge;
- res = asprintf(&value_str, "%.8f", tmp_v, sensu_tags);
+ res = asprintf(&value_str, "%.8f", tmp_v);
if (res == -1) {
free(ret_str);
ERROR("write_sensu plugin: Unable to alloc memory");
}
} else if (rates != NULL) {
double tmp_v = (double) rates[index];
- res = asprintf(&value_str, "%.8f", tmp_v, sensu_tags);
+ res = asprintf(&value_str, "%.8f", tmp_v);
if (res == -1) {
free(ret_str);
ERROR("write_sensu plugin: Unable to alloc memory");
tmp_v = (int64_t) vl->values[index].absolute;
else
tmp_v = (int64_t) vl->values[index].counter;
- res = asprintf(&value_str, "%lld", tmp_v, sensu_tags);
+ res = asprintf(&value_str, "%ld", tmp_v);
if (res == -1) {
free(ret_str);
ERROR("write_sensu plugin: Unable to alloc memory");