git: 79554f2b6ca6 - main - net: whack "set but not used" warnings in net/rtsock.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Nov 2021 17:21:35 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=79554f2b6ca635f95cda63cbe18613d89675cb1f commit 79554f2b6ca635f95cda63cbe18613d89675cb1f Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-11-14 17:20:46 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> 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) {