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 a8e43a4c0b
commit 02fc8e3b1c
78 changed files with 204 additions and 131 deletions

View File

@@ -56,7 +56,7 @@ struct CompileHSStats {
class EngineHSContext : public EngineContext {
public:
explicit EngineHSContext(const hs_database_t *db);
~EngineHSContext();
virtual ~EngineHSContext() override;
hs_scratch_t *scratch = nullptr;
};
@@ -64,7 +64,7 @@ public:
/** Streaming mode scans have persistent stream state associated with them. */
class EngineHSStream : public EngineStream {
public:
~EngineHSStream();
virtual ~EngineHSStream() override;
hs_stream_t *id = nullptr;
EngineHSContext *ctx = nullptr;
};
@@ -73,7 +73,7 @@ public:
class EngineHyperscan : public Engine {
public:
explicit EngineHyperscan(hs_database_t *db, CompileHSStats cs);
~EngineHyperscan();
virtual ~EngineHyperscan() override;
std::unique_ptr<EngineContext> makeContext() const override;