diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-03-15 12:04:27 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-08 18:52:55 +0200 |
commit | 6dddcc519697a9a0b8e17707fd8f8a38ec8d1aa2 (patch) | |
tree | cd707ffa2903ec246e7ba1feeb16cb594ab5fce4 /sysdep/linux | |
parent | ba6641f4f88371fd07dcc1a1228840ea465c91b3 (diff) |
Wireguard-lib: Fix unused parameter warnings
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/wireguard.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdep/linux/wireguard.c b/sysdep/linux/wireguard.c index 54b87004..e8985c47 100644 --- a/sysdep/linux/wireguard.c +++ b/sysdep/linux/wireguard.c @@ -24,6 +24,8 @@ #include "wireguard.h" +#define UNUSED __attribute__((unused)) + /* wireguard.h netlink uapi: */ #define WG_GENL_NAME "wireguard" @@ -441,12 +443,12 @@ static void mnl_attr_nest_cancel(struct nlmsghdr *nlh, struct nlattr *start) nlh->nlmsg_len -= mnl_nlmsg_get_payload_tail(nlh) - (void *)start; } -static int mnl_cb_noop(const struct nlmsghdr *nlh, void *data) +static int mnl_cb_noop(const struct nlmsghdr *nlh UNUSED, void *data UNUSED) { return MNL_CB_OK; } -static int mnl_cb_error(const struct nlmsghdr *nlh, void *data) +static int mnl_cb_error(const struct nlmsghdr *nlh, void *data UNUSED) { const struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh); @@ -463,7 +465,7 @@ static int mnl_cb_error(const struct nlmsghdr *nlh, void *data) return err->error == 0 ? MNL_CB_STOP : MNL_CB_ERROR; } -static int mnl_cb_stop(const struct nlmsghdr *nlh, void *data) +static int mnl_cb_stop(const struct nlmsghdr *nlh UNUSED, void *data UNUSED) { return MNL_CB_STOP; } |