From nobody Sun Nov 14 17:21:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1FB1818678C7; Sun, 14 Nov 2021 17:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HsfJ007WVz3hYx; Sun, 14 Nov 2021 17:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8F7B2488; Sun, 14 Nov 2021 17:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AEHLZhv053025; Sun, 14 Nov 2021 17:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AEHLZW9053024; Sun, 14 Nov 2021 17:21:35 GMT (envelope-from git) Date: Sun, 14 Nov 2021 17:21:35 GMT Message-Id: <202111141721.1AEHLZW9053024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 79554f2b6ca6 - main - net: whack "set but not used" warnings in net/rtsock.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79554f2b6ca635f95cda63cbe18613d89675cb1f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=79554f2b6ca635f95cda63cbe18613d89675cb1f commit 79554f2b6ca635f95cda63cbe18613d89675cb1f Author: Mateusz Guzik AuthorDate: 2021-11-14 17:20:46 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-14 17:20:46 +0000 net: whack "set but not used" warnings in net/rtsock.c ... except for one where the error is ignored. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/rtsock.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 9c91672e0247..6495a4102570 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -632,7 +632,6 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, struct linear_buffer *lb, u_int fi struct rt_addrinfo *info) { int error; - sa_family_t saf; rtm->rtm_pid = curproc->p_pid; info->rti_addrs = rtm->rtm_addrs; @@ -652,7 +651,6 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, struct linear_buffer *lb, u_int fi error = cleanup_xaddrs(info, lb); if (error != 0) return (error); - saf = info->rti_info[RTAX_DST]->sa_family; /* * Verify that the caller has the appropriate privilege; RTM_GET * is the only operation the non-superuser is allowed. @@ -1025,7 +1023,6 @@ static int route_output(struct mbuf *m, struct socket *so, ...) { struct rt_msghdr *rtm = NULL; - struct rtentry *rt = NULL; struct rt_addrinfo info; struct epoch_tracker et; #ifdef INET6 @@ -1187,7 +1184,6 @@ route_output(struct mbuf *m, struct socket *so, ...) flush: NET_EPOCH_EXIT(et); - rt = NULL; #ifdef INET6 if (rtm != NULL) {