X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_log.c;h=b0dc6f11cca43072ed7a094ba6ef3c2f2e6ac794;hb=3d74a63ae43c1786eb9b966e2209c24c5643dae8;hp=db09849fefc75aa2691a8c663be40f885b63a0fb;hpb=7b64cc91d3307179557b25b6ece2349a088f4294;p=collectd.git diff --git a/src/write_log.c b/src/write_log.c index db09849f..b0dc6f11 100644 --- a/src/write_log.c +++ b/src/write_log.c @@ -26,9 +26,9 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" -#include "configfile.h" #include "utils_format_graphite.h" @@ -38,7 +38,7 @@ static int wl_write_messages (const data_set_t *ds, const value_list_t *vl) { - char buffer[WL_BUF_SIZE]; + char buffer[WL_BUF_SIZE] = { 0 }; int status; if (0 != strcmp (ds->type, vl->type)) @@ -48,7 +48,6 @@ static int wl_write_messages (const data_set_t *ds, const value_list_t *vl) return -1; } - memset (buffer, 0, sizeof (buffer)); status = format_graphite (buffer, sizeof (buffer), ds, vl, NULL, NULL, '_', 0); if (status != 0) /* error message has been printed already. */ @@ -60,7 +59,7 @@ static int wl_write_messages (const data_set_t *ds, const value_list_t *vl) } /* int wl_write_messages */ static int wl_write (const data_set_t *ds, const value_list_t *vl, - user_data_t *user_data) + __attribute__ ((unused)) user_data_t *user_data) { int status;