Various cppcheck fixes (#337)

This commit is contained in:
Konstantinos Margaritis
2025-05-30 12:27:28 +03:00
committed by GitHub
parent 4f40db0755
commit 7b505226ed
11 changed files with 31 additions and 29 deletions

View File

@@ -93,7 +93,7 @@ extern "C" {
static
hwlmcb_rv_t decentCallback(size_t end, u32 id,
UNUSED struct hs_scratch *scratch) {
UNUSED struct hs_scratch *scratch) { // cppcheck-suppress constParameterCallback
DEBUG_PRINTF("match @%zu : %u\n", end, id);
matches.push_back(match(end, id));
@@ -102,7 +102,7 @@ hwlmcb_rv_t decentCallback(size_t end, u32 id,
static
hwlmcb_rv_t decentCallbackT(size_t end, u32 id,
UNUSED struct hs_scratch *scratch) {
UNUSED struct hs_scratch *scratch) { // cppcheck-suppress constParameterCallback
matches.push_back(match(end, id));
return HWLM_TERMINATE_MATCHING;
}

View File

@@ -101,7 +101,7 @@ map<u32, int> matchesCounts;
extern "C" {
static hwlmcb_rv_t countCallback(UNUSED size_t end, u32 id,
UNUSED struct hs_scratch *scratch) {
UNUSED struct hs_scratch *scratch) { // cppcheck-suppress constParameterCallback
matchesCounts[id]++;
return HWLM_CONTINUE_MATCHING;
}