git: a74dd993696d - stable/13 - Fix unused variable warning in ipsec_mbuf.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 24 Jul 2022 11:01:39 UTC
The branch stable/13 has been updated by dim:

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

commit a74dd993696d38a0164560ef2e38dc0f0ffb8ee7
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-21 20:03:50 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 11:00:06 +0000

    Fix unused variable warning in ipsec_mbuf.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/netipsec/ipsec_mbuf.c:93:24: error: variable 'alloc' set but not used [-Werror,-Wunused-but-set-variable]
                        int todo, len, done, alloc;
                                             ^
    
    The 'alloc' variable appears to have been a debugging aid that has never
    been used for anything, so remove it.
    
    MFC after:      3 days
    
    (cherry picked from commit df5d2841d507589af0de7301f6cee3d2b98a35be)
---
 sys/netipsec/ipsec_mbuf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/netipsec/ipsec_mbuf.c b/sys/netipsec/ipsec_mbuf.c
index 170728f91bde..75aa8cae5a31 100644
--- a/sys/netipsec/ipsec_mbuf.c
+++ b/sys/netipsec/ipsec_mbuf.c
@@ -90,11 +90,10 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
 		*off = skip;
 	} else if (hlen > M_TRAILINGSPACE(m)) {
 		struct mbuf *n0, *n, **np;
-		int todo, len, done, alloc;
+		int todo, len, done;
 
 		n0 = NULL;
 		np = &n0;
-		alloc = 0;
 		done = 0;
 		todo = remain;
 		while (todo > 0) {
@@ -112,7 +111,6 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
 			}
 			*np = n;
 			np = &n->m_next;
-			alloc++;
 			len = min(todo, len);
 			memcpy(n->m_data, mtod(m, char *) + skip + done, len);
 			n->m_len = len;
@@ -134,7 +132,6 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
 				m_freem(n0);
 				return NULL;
 			}
-			alloc++;
 
 			if ((n->m_next = n0) == NULL)
 				np = &n->m_next;