git: 96a32ccaa99c - stable/13 - Fix unused variable warning in if_pfsync.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 29 Jul 2022 18:47:09 UTC
The branch stable/13 has been updated by dim:

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

commit 96a32ccaa99cededf33d488942683d93a69b006e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-25 18:15:51 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:28:07 +0000

    Fix unused variable warning in if_pfsync.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/netpfil/pf/if_pfsync.c:2153:9: error: variable 'sent' set but not used [-Werror,-Wunused-but-set-variable]
                int i, sent = 0;
                       ^
    
    The 'sent' variable was used in the for loop later in the
    pfsync_bulk_update() function, but refactoring in 4fc65bcbe3fb7 got rid
    of it. Remove the variable since it no longer serves any purpose.
    
    MFC after:      3 days
    
    (cherry picked from commit fb48e998501f8d1defecffb772121a4141cdc2b6)
---
 sys/netpfil/pf/if_pfsync.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index 11ac0f6951bd..998f8a4f5521 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -2150,7 +2150,7 @@ pfsync_bulk_update(void *arg)
 {
 	struct pfsync_softc *sc = arg;
 	struct pf_kstate *s;
-	int i, sent = 0;
+	int i;
 
 	PFSYNC_BLOCK_ASSERT(sc);
 	CURVNET_SET(sc->sc_ifp->if_vnet);
@@ -2191,7 +2191,6 @@ pfsync_bulk_update(void *arg)
 					    pfsync_bulk_update, sc);
 					goto full;
 				}
-				sent++;
 			}
 		}
 		PF_HASHROW_UNLOCK(ih);