Mark unused parameters and set -Wunused-parameter
This allows us to compile with -Wall -Werror in build
environments where -Wall also warns about unused parameters.
Also explicitly set -Wunused-parameter so unused parameters will
cause the build to fail in environments where -Wall does not warn
about them.
Change-Id: Icccf2121d2a9df77b1c224c4976cb9aec56496b3
diff --git a/netlink_callbacks.c b/netlink_callbacks.c
index 5e0f34e..a79aa76 100644
--- a/netlink_callbacks.c
+++ b/netlink_callbacks.c
@@ -27,7 +27,7 @@
* msg - netlink message
* data - pointer to an int, stores the success code
*/
-static int ack_handler(struct nl_msg *msg, void *data) {
+static int ack_handler(__attribute__((unused)) struct nl_msg *msg, void *data) {
int *retval = data;
*retval = 0;
return NL_OK;
@@ -39,7 +39,8 @@
* err - netlink error message
* arg - pointer to an int, stores the error code
*/
-static int error_handler(struct sockaddr_nl *nla, struct nlmsgerr *err, void *arg) {
+static int error_handler(__attribute__((unused)) struct sockaddr_nl *nla,
+ struct nlmsgerr *err, void *arg) {
int *retval = arg;
if(err->error < 0) {
*retval = err->error;