]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Suppress unused variable warning in ip_dummynet.c
authorDimitry Andric <dim@FreeBSD.org>
Tue, 19 Jul 2022 19:43:46 +0000 (21:43 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Wed, 20 Jul 2022 15:13:49 +0000 (17:13 +0200)
commit5c329f0a4d32cec54250ec2d3f61455e85137a6f
tree0e934cf4aa11331f982b15821fe6ac57d5f558e6
parent3dbe05f61b65a73582aefdc2ee5a50ad2b4390ef
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