[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221208011122.2343363-6-jesse.brandeburg@intel.com>
Date:   Wed,  7 Dec 2022 17:11:14 -0800
From:   Jesse Brandeburg <jesse.brandeburg@...el.com>
To:     mkubecek@...e.cz
Cc:     netdev@...r.kernel.org,
        Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: [PATCH ethtool v2 05/13] ethtool: fix extra warnings
'$ scan-build make' reports
netlink/permaddr.c:44:2: warning: Value stored to 'ifinfo' is never read [deadcode.DeadStores]
        ifinfo = mnl_nlmsg_put_extra_header(nlhdr, sizeof(*ifinfo));
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So just remove the extra assignment which is never used.
Fixes: 7f3585b22a4b ("netlink: add handler for permaddr (-P)")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
---
 netlink/permaddr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netlink/permaddr.c b/netlink/permaddr.c
index 006eac6c0094..dccb0c6cfdb7 100644
--- a/netlink/permaddr.c
+++ b/netlink/permaddr.c
@@ -41,7 +41,7 @@ static int permaddr_prep_request(struct nl_socket *nlsk)
 	nlhdr->nlmsg_type = RTM_GETLINK;
 	nlhdr->nlmsg_flags = nlm_flags;
 	msgbuff->nlhdr = nlhdr;
-	ifinfo = mnl_nlmsg_put_extra_header(nlhdr, sizeof(*ifinfo));
+	mnl_nlmsg_put_extra_header(nlhdr, sizeof(*ifinfo));
 
 	if (devname) {
 		uint16_t type = IFLA_IFNAME;
-- 
2.31.1
Powered by blists - more mailing lists
 
