HomeFreeBSD

net-mgmt/pmacct: mark unused but set variables with attributes

Description

net-mgmt/pmacct: mark unused but set variables with attributes

With clang 13, building net-mgmt/pmacct results in a number of warnings:

netflow9.c:2236:25: error: variable 'tot_len' set but not used [-Werror,-Wunused-but-set-variable]

u_int16_t flows = 0, tot_len = 0;
                     ^

In this particular instance, the 'tot_len' variable does not seem to
have any purpose, nor does it have any further side-effects. There is
one more instance of a set but unused variable 'label' in src/sflow.c,
but the code there is also increasing a byte ptr, so it can't easily be
eliminated. For now mark these variables as unused, with an attribute.

Approved by: pi (maintainer)
PR: 258513
MFC: 2021Q3

Details

Provenance
dimAuthored on Sep 22 2021, 6:43 PM
Parents
R11:ddbefb7de3a8: finance/R-cran-plm: Update to 2.4-2
Branches
Unknown
Tags
Unknown