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

@@ -307,7 +307,7 @@ char lbrMatchLoop(const struct lbr_common *l, const u64a begin, const u64a end,
static really_inline
char lbrRevScanDot(UNUSED const struct NFA *nfa, UNUSED const u8 *buf,
UNUSED size_t begin, UNUSED size_t end,
UNUSED size_t *loc) {
UNUSED const size_t *loc) {
assert(begin <= end);
assert(nfa->type == LBR_NFA_DOT);
// Nothing can kill a dot!
@@ -413,7 +413,7 @@ char lbrRevScanTruf(const struct NFA *nfa, const u8 *buf,
static really_inline
char lbrFwdScanDot(UNUSED const struct NFA *nfa, UNUSED const u8 *buf,
UNUSED size_t begin, UNUSED size_t end,
UNUSED size_t *loc) {
UNUSED const size_t *loc) {
assert(begin <= end);
assert(nfa->type == LBR_NFA_DOT);
// Nothing can kill a dot!

View File

@@ -180,7 +180,7 @@ found_top:;
u64a ep = MIN(MIN(end, (s64a)q->length) + offset, first_match);
if (ep > sp && sp >= offset) {
size_t eloc;
size_t eloc = 0;
DEBUG_PRINTF("rev b%llu e%llu/%zu\n", sp - offset, ep - offset,
q->length);
assert(ep - offset <= q->length);