From: Eero Tamminen Date: Fri, 4 Feb 2022 10:19:06 +0000 (+0200) Subject: Remove unused function arguments from few of the plugins X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea37e21f929b9484e007b742739766b0f279419e;p=thirdparty%2Fcollectd.git Remove unused function arguments from few of the plugins Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output. --- diff --git a/src/table.c b/src/table.c index f181de946..223d2eebe 100644 --- a/src/table.c +++ b/src/table.c @@ -392,7 +392,7 @@ static int tbl_result_dispatch(tbl_t *tbl, tbl_result_t *res, char **fields, return 0; } /* tbl_result_dispatch */ -static int tbl_parse_line(tbl_t *tbl, char *line, size_t len) { +static int tbl_parse_line(tbl_t *tbl, char *line) { char *fields[tbl->max_colnum + 1]; size_t i = 0; @@ -438,7 +438,7 @@ static int tbl_read_table(tbl_t *tbl) { log_warn("Table %s: Truncated line: %s", tbl->file, buf); } - if (tbl_parse_line(tbl, buf, sizeof(buf)) != 0) { + if (tbl_parse_line(tbl, buf) != 0) { log_warn("Table %s: Failed to parse line: %s", tbl->file, buf); continue; } diff --git a/src/write_syslog.c b/src/write_syslog.c index 92c5ddeba..9b35ceceb 100644 --- a/src/write_syslog.c +++ b/src/write_syslog.c @@ -373,7 +373,7 @@ static int ws_format_values(char *ret, size_t ret_len, int ds_num, } static int ws_format_name(char *ret, int ret_len, const value_list_t *vl, - const struct ws_callback *cb, const char *ds_name) { + const char *ds_name) { if (ds_name != NULL) { snprintf(ret, ret_len, "%s.%s", vl->type, ds_name); @@ -509,7 +509,7 @@ static int ws_write_messages(const data_set_t *ds, const value_list_t *vl, ds_name = ds->ds[i].name; /* Copy the identifier to 'key' and escape it. */ - status = ws_format_name(key, sizeof(key), vl, cb, ds_name); + status = ws_format_name(key, sizeof(key), vl, ds_name); if (status != 0) { ERROR("write_syslog plugin: error with format_name"); return status; diff --git a/src/write_tsdb.c b/src/write_tsdb.c index f8f4cb910..d525b329b 100644 --- a/src/write_tsdb.c +++ b/src/write_tsdb.c @@ -366,7 +366,7 @@ static int wt_format_values(char *ret, size_t ret_len, int ds_num, } static int wt_format_name(char *ret, int ret_len, const value_list_t *vl, - const struct wt_callback *cb, const char *ds_name) { + const char *ds_name) { int status; char *temp = NULL; const char *prefix = ""; @@ -527,7 +527,7 @@ static int wt_write_messages(const data_set_t *ds, const value_list_t *vl, ds_name = ds->ds[i].name; /* Copy the identifier to 'key' and escape it. */ - status = wt_format_name(key, sizeof(key), vl, cb, ds_name); + status = wt_format_name(key, sizeof(key), vl, ds_name); if (status != 0) { ERROR("write_tsdb plugin: error with format_name"); return status;