@@ -21,7 +21,8 @@ struct pause_autoneg_status {
bool asym_pause;
};
-static void pause_autoneg_walker(unsigned int idx, const char *name, bool val,
+static void pause_autoneg_walker(unsigned int idx,
+ const char *name __maybe_unused, bool val,
void *data)
{
struct pause_autoneg_status *status = data;
@@ -19,7 +19,7 @@
/* PRIVFLAGS_GET */
static void privflags_maxlen_walk_cb(unsigned int idx, const char *name,
- bool val, void *data)
+ bool val __maybe_unused, void *data)
{
unsigned int *maxlen = data;
unsigned int len, n;
@@ -656,7 +656,8 @@ int linkstate_reply_cb(const struct nlmsghdr *nlhdr, void *data)
return MNL_CB_OK;
}
-void wol_modes_cb(unsigned int idx, const char *name, bool val, void *data)
+void wol_modes_cb(unsigned int idx, const char *name __maybe_unused, bool val,
+ void *data)
{
struct ethtool_wolinfo *wol = data;
@@ -704,7 +705,8 @@ int wol_reply_cb(const struct nlmsghdr *nlhdr, void *data)
return MNL_CB_OK;
}
-void msgmask_cb(unsigned int idx, const char *name, bool val, void *data)
+void msgmask_cb(unsigned int idx, const char *name __maybe_unused, bool val,
+ void *data)
{
u32 *msg_mask = data;
@@ -714,7 +716,8 @@ void msgmask_cb(unsigned int idx, const char *name, bool val, void *data)
*msg_mask |= (1U << idx);
}
-void msgmask_cb2(unsigned int idx, const char *name, bool val, void *data)
+void msgmask_cb2(unsigned int idx __maybe_unused, const char *name,
+ bool val, void *data __maybe_unused)
{
if (val)
printf(" %s", name);
@@ -16,7 +16,7 @@
/* TSINFO_GET */
static void tsinfo_dump_cb(unsigned int idx, const char *name, bool val,
- void *data)
+ void *data __maybe_unused)
{
if (!val)
return;
Some callbacks used with walk_bitset() do not use all parameters passed to them. Mark unused parameters explicitly to get rid of compiler warnings. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> --- netlink/pause.c | 3 ++- netlink/privflags.c | 2 +- netlink/settings.c | 9 ++++++--- netlink/tsinfo.c | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-)