]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Remove unused function arguments from few of the plugins
authorEero Tamminen <eero.t.tamminen@intel.com>
Fri, 4 Feb 2022 10:19:06 +0000 (12:19 +0200)
committerEero Tamminen <eero.t.tamminen@intel.com>
Tue, 16 Jan 2024 13:03:00 +0000 (15:03 +0200)
Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.

src/table.c
src/write_syslog.c
src/write_tsdb.c

index f181de94624b2be7201819592d120c43d61b5455..223d2eebe212b0efa22e574b9245dc5ca16d6119 100644 (file)
@@ -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;
     }
index 92c5ddeba4192a99bfdc357dea133dc7c4f58fa5..9b35ceceb3e5ef9a9c4083a99b5c146d609b1ccd 100644 (file)
@@ -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;
index f8f4cb9104efb1753a875402510ecabc0eb1adc3..d525b329ba123c4bc808b33f4e133b652746b100 100644 (file)
@@ -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;