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:
Konstantinos Margaritis
2024-05-27 12:23:02 +03:00
committed by GitHub
parent cebc6541c1
commit c837925087
78 changed files with 204 additions and 131 deletions

View File

@@ -192,6 +192,7 @@ void *count_malloc(size_t n) {
*(reinterpret_cast<size_t *>(pp)) = n;
void *p = static_cast<char *>(pp) + 16;
// cppcheck-suppress memleak
return p;
}
@@ -218,6 +219,7 @@ void *count_malloc_b(size_t n) {
*(reinterpret_cast<size_t *>(pp)) = n;
void *p = static_cast<char *>(pp) + 32;
// cppcheck-suppress memleak
return p;
}