git: a98bb75f80ba - main - netinet6: Use __diagused for variables only used in KASSERT().

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 13 Apr 2022 23:09:12 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=a98bb75f80ba1089abf9054440cd3ad4dee1b557

commit a98bb75f80ba1089abf9054440cd3ad4dee1b557
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-13 23:08:19 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-13 23:08:19 +0000

    netinet6: Use __diagused for variables only used in KASSERT().
---
 sys/netinet6/in6.c     | 2 +-
 sys/netinet6/in6_rmx.c | 2 +-
 sys/netinet6/mld6.c    | 2 +-
 sys/netinet6/raw_ip6.c | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index c273d74b565c..ba22dbb65e31 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2183,7 +2183,7 @@ in6_lltable_match_prefix(const struct sockaddr *saddr,
 static void
 in6_lltable_free_entry(struct lltable *llt, struct llentry *lle)
 {
-	struct ifnet *ifp;
+	struct ifnet *ifp __diagused;
 
 	LLE_WLOCK_ASSERT(lle);
 	KASSERT(llt != NULL, ("lltable is NULL"));
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index d1c0a83d0002..f5d4a75d7a70 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -138,7 +138,7 @@ struct rib_head *
 in6_inithead(uint32_t fibnum)
 {
 	struct rib_head *rh;
-	struct rib_subscription *rs;
+	struct rib_subscription *rs __diagused;
 
 	rh = rt_table_init(offsetof(struct sockaddr_in6, sin6_addr) << 3,
 	    AF_INET6, fibnum);
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 15ad5196d205..dae0cea48cdc 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -2242,7 +2242,7 @@ mld_final_leave(struct in6_multi *inm, struct mld_ifsoftc *mli)
 				inm->in6m_state = MLD_NOT_MEMBER;
 				inm->in6m_sctimer = 0;
 			} else {
-				int retval;
+				int retval __diagused;
 
 				in6m_acquire_locked(inm);
 
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index cb54d1268cef..04137a8ed0a6 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -689,7 +689,7 @@ rip6_detach(struct socket *so)
 static void
 rip6_abort(struct socket *so)
 {
-	struct inpcb *inp;
+	struct inpcb *inp __diagused;
 
 	inp = sotoinpcb(so);
 	KASSERT(inp != NULL, ("rip6_abort: inp == NULL"));
@@ -700,7 +700,7 @@ rip6_abort(struct socket *so)
 static void
 rip6_close(struct socket *so)
 {
-	struct inpcb *inp;
+	struct inpcb *inp __diagused;
 
 	inp = sotoinpcb(so);
 	KASSERT(inp != NULL, ("rip6_close: inp == NULL"));