git: 732b6d4d506d - main - netinet: Use __diagused for variables only used in KASSERT().

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

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

commit 732b6d4d506d231926914be2cd57b640e5a8ae3d
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

    netinet: Use __diagused for variables only used in KASSERT().
---
 sys/netinet/tcp_log_buf.c | 2 +-
 sys/netinet/tcp_output.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c
index 0e0b6a35013b..a0a0a97d5fae 100644
--- a/sys/netinet/tcp_log_buf.c
+++ b/sys/netinet/tcp_log_buf.c
@@ -1495,7 +1495,7 @@ static void
 tcp_log_purge_tp_logbuf(struct tcpcb *tp)
 {
 	struct tcp_log_mem *log_entry;
-	struct inpcb *inp;
+	struct inpcb *inp __diagused;
 
 	inp = tp->t_inpcb;
 	INP_WLOCK_ASSERT(inp);
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 83ce5b061f09..299f1d034717 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1956,7 +1956,7 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *plen,
 {
 #ifdef KERN_TLS
 	struct ktls_session *tls, *ntls;
-	struct mbuf *start;
+	struct mbuf *start __diagused;
 #endif
 	struct mbuf *n, **np;
 	struct mbuf *top;