git: 5c329f0a4d32 - main - Suppress unused variable warning in ip_dummynet.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 20 Jul 2022 16:50:51 UTC
The branch main has been updated by dim:

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

commit 5c329f0a4d32cec54250ec2d3f61455e85137a6f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 19:43:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-20 15:13:49 +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
---
 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 503fbef6f530..3b55d59f482b 100644
--- a/sys/netpfil/ipfw/ip_dummynet.c
+++ b/sys/netpfil/ipfw/ip_dummynet.c
@@ -799,7 +799,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))) {