obmc-console: Mark unused parameters as such
As part of the clean up, remove the size parameter from log_trim().
log_trim() is a static function that only has one call site, so it was
straight-forward to fix without applying __attribute__((unused)).
Change-Id: Ic61821934dab644590adb4df09b7a8f547aa1c5a
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/console-server.c b/console-server.c
index 11d017b..17a923a 100644
--- a/console-server.c
+++ b/console-server.c
@@ -357,9 +357,12 @@
return sd_bus_reply_method_return(msg, "x", r);
}
-static int get_handler(sd_bus *bus, const char *path, const char *interface,
- const char *property, sd_bus_message *reply, void *userdata,
- sd_bus_error *error) {
+static int get_handler(sd_bus *bus __attribute__((unused)),
+ const char *path __attribute__((unused)),
+ const char *interface __attribute__((unused)),
+ const char *property __attribute__((unused)),
+ sd_bus_message *reply, void *userdata,
+ sd_bus_error *error __attribute__((unused))) {
struct console *console = userdata;
uint32_t baudrate;
int r;
@@ -380,7 +383,7 @@
SD_BUS_PROPERTY("baudrate", "u", get_handler, 0, 0),
SD_BUS_VTABLE_END,};
-static void dbus_init(struct console *console, struct config *config)
+static void dbus_init(struct console *console, struct config *config __attribute__((unused)))
{
int dbus_poller = 0;
int fd, r;
@@ -573,8 +576,8 @@
console->pollfds[i].events = events;
}
-void console_poller_set_timeout(struct console *console, struct poller *poller,
- const struct timeval *tv)
+void console_poller_set_timeout(struct console *console __attribute__((unused)),
+ struct poller *poller, const struct timeval *tv)
{
struct timeval now;
int rc;
diff --git a/log-handler.c b/log-handler.c
index 2e0df6e..6d31be6 100644
--- a/log-handler.c
+++ b/log-handler.c
@@ -51,7 +51,7 @@
return container_of(handler, struct log_handler, handler);
}
-static int log_trim(struct log_handler *lh, size_t space)
+static int log_trim(struct log_handler *lh)
{
int rc;
@@ -84,7 +84,7 @@
}
if (lh->size + len > lh->maxsize) {
- rc = log_trim(lh, len);
+ rc = log_trim(lh);
if (rc)
return rc;
}
diff --git a/socket-handler.c b/socket-handler.c
index 42690be..7da6818 100644
--- a/socket-handler.c
+++ b/socket-handler.c
@@ -211,7 +211,7 @@
return RINGBUFFER_POLL_OK;
}
-static enum poller_ret client_timeout(struct handler *handler, void *data)
+static enum poller_ret client_timeout(struct handler *handler __attribute__((unused)), void *data)
{
struct client *client = data;
int rc = 0;