lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <820434dc601a5382260711db05764f33898dfcfe.1596451857.git.mkubecek@suse.cz>
Date:   Mon,  3 Aug 2020 13:57:18 +0200 (CEST)
From:   Michal Kubecek <mkubecek@...e.cz>
To:     netdev@...r.kernel.org
Subject: [PATCH ethtool 5/7] netlink: mark unused parameters of bitset walker
 callbacks

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@...e.cz>
---
 netlink/pause.c     | 3 ++-
 netlink/privflags.c | 2 +-
 netlink/settings.c  | 9 ++++++---
 netlink/tsinfo.c    | 2 +-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/netlink/pause.c b/netlink/pause.c
index 48215d29aa34..7b6b3a1d2c10 100644
--- a/netlink/pause.c
+++ b/netlink/pause.c
@@ -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;
diff --git a/netlink/privflags.c b/netlink/privflags.c
index a06cd6d88d9d..299ccdc21581 100644
--- a/netlink/privflags.c
+++ b/netlink/privflags.c
@@ -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;
diff --git a/netlink/settings.c b/netlink/settings.c
index 726259d83702..17ef000ed812 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -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);
diff --git a/netlink/tsinfo.c b/netlink/tsinfo.c
index 03ce91cd4314..c6571ffc16ff 100644
--- a/netlink/tsinfo.c
+++ b/netlink/tsinfo.c
@@ -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;
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ