]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix unused variable warning in fwohci.c
authorDimitry Andric <dim@FreeBSD.org>
Thu, 21 Jul 2022 17:59:08 +0000 (19:59 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Thu, 21 Jul 2022 19:05:50 +0000 (21:05 +0200)
commitd7e0d962f39877b997454992a980f4122c6316e7
tree416a3696e2990c5bfaadec36f40573531c6c95a7
parentabfa92dee642a3687aaef107203e69722a16ef8c
Fix unused variable warning in fwohci.c

With clang 15, the following -Werror warning is produced:

    sys/dev/firewire/fwohci.c:2762:23: error: variable 'pcnt' set but not used [-Werror,-Wunused-but-set-variable]
            int len, plen, hlen, pcnt, offset;
                                 ^

The 'pcnt' variable is eventually used only in an #if 0'd block,
obviously meant for debugging. Ensure that 'pcnt' is only declared and
used when COUNT_PACKETS is defined, so the debugging can be easily
turned on later, if desired.

MFC after: 3 days
sys/dev/firewire/fwohci.c