The branch main has been updated by dim:

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

commit df5d2841d507589af0de7301f6cee3d2b98a35be
Author:     Dimitry Andric <d...@freebsd.org>
AuthorDate: 2022-07-21 20:03:50 +0000
Commit:     Dimitry Andric <d...@freebsd.org>
CommitDate: 2022-07-21 20:12:01 +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
---
 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;

Reply via email to