git: 9e9459ac32b5 - stable/13 - Suppress unused variable warning in ip_dummynet.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 23 Jul 2022 08:58:25 UTC
The branch stable/13 has been updated by dim:

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

commit 9e9459ac32b56eeac39fd0226114772a440bf83d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 19:43:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:56:46 +0000

    Suppress unused variable warning in ip_dummynet.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/netpfil/ipfw/ip_dummynet.c:802:6: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
                int n = 0; /* only for stats */
                    ^
    
    Here, 'n' is a variable that is only used when debugging. Mark the
    variable as potentially unused, to suppress the warning.
    
    MFC after:      3 days
    
    (cherry picked from commit 5c329f0a4d32cec54250ec2d3f61455e85137a6f)
---
 sys/netpfil/ipfw/ip_dummynet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c
index 93b361755d9c..a157b3d928cd 100644
--- a/sys/netpfil/ipfw/ip_dummynet.c
+++ b/sys/netpfil/ipfw/ip_dummynet.c
@@ -787,7 +787,7 @@ static void
 fsk_detach_list(struct dn_fsk_head *h, int flags)
 {
 	struct dn_fsk *fs;
-	int n = 0; /* only for stats */
+	int n __unused = 0; /* only for stats */
 
 	ND("head %p flags %x", h, flags);
 	while ((fs = SLIST_FIRST(h))) {