HomeFreeBSD

Fix unused variable warnings in hwpmc_mod.c

Description

Fix unused variable warnings in hwpmc_mod.c

With clang 15, the following -Werror warnings are produced:

sys/dev/hwpmc/hwpmc_mod.c:4805:6: error: variable 'nfree' set but not used [-Werror,-Wunused-but-set-variable]
        int nfree;
            ^
sys/dev/hwpmc/hwpmc_mod.c:4804:6: error: variable 'ncallchains' set but not used [-Werror,-Wunused-but-set-variable]
        int ncallchains;
            ^

The 'nfree' and 'ncallchains' variables were used in KASSERTs, but these
were removed due to refactoring in d9f1b8dbf29d. Remove the variables
since they no longer serve any purpose.

MFC after: 3 days

(cherry picked from commit 38a9b8a00ce933e99b4a643cdcc3220be82e7d62)

Details

Provenance
dimAuthored on Jul 21 2022, 6:35 PM
Parents
rG8b5b4fc7ca52: Adjust tdsaContext_t::NvmdResponseSet declaration to avoid clang 15 warning
Branches
Unknown
Tags
Unknown