mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 09:21:52 +03:00
Fix/Suppress remaining Cppcheck warnings (#291)
Fix/suppress the following cppcheck warnings: * arithOperationsOnVoidPointer * uninitMember * const* * shadowVariable * assignmentIntegerToAddress * containerOutOfBounds * pointer-related warnings in Ragel source * missingOverride * memleak * knownConditionTrueFalse * noExplicitConstructor * invalidPrintfArgType_sint * useStlAlgorithm * cstyleCast * clarifyCondition * VSX-related cstyleCast * unsignedLessThanZero Furthermore, we added a suppression list to be used, which also includes the following: * missingIncludeSystem * missingInclude * unmatchedSuppression
This commit is contained in:
committed by
GitHub
parent
a8e43a4c0b
commit
02fc8e3b1c
@@ -279,6 +279,7 @@ char JOIN(ENGINE_EXEC_NAME, _Q_i)(const struct NFA *nfa, struct mq *q,
|
||||
assert(rv == MO_CONTINUE_MATCHING);
|
||||
}
|
||||
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (escape_found) {
|
||||
DEBUG_PRINTF("clearing repeat due to escape\n");
|
||||
clearRepeat(info, lstate);
|
||||
@@ -355,6 +356,7 @@ void JOIN(ENGINE_EXEC_NAME, _StreamSilent)(const struct NFA *nfa, struct mq *q,
|
||||
|
||||
size_t eloc = 0;
|
||||
char escaped = FWDSCAN_FN(nfa, buf, 0, length, &eloc);
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (escaped) {
|
||||
assert(eloc < length);
|
||||
DEBUG_PRINTF("escape found at %zu, clearing repeat\n", eloc);
|
||||
|
||||
Reference in New Issue
Block a user