mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 09:45:28 +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
cebc6541c1
commit
c837925087
@@ -66,6 +66,7 @@ ostream& operator<<(ostream &os, const RepeatInfo &info) {
|
||||
|
||||
class RepeatTest : public TestWithParam<RepeatTestInfo> {
|
||||
protected:
|
||||
RepeatTest() = default;
|
||||
virtual void SetUp() {
|
||||
test_info = GetParam();
|
||||
|
||||
@@ -94,12 +95,12 @@ protected:
|
||||
delete [] state_int;
|
||||
}
|
||||
|
||||
RepeatTestInfo test_info; // Test params
|
||||
RepeatInfo info; // Repeat info structure
|
||||
RepeatControl *ctrl;
|
||||
char *state;
|
||||
RepeatTestInfo test_info{}; // Test params
|
||||
RepeatInfo info{}; // Repeat info structure
|
||||
RepeatControl *ctrl = nullptr;
|
||||
char *state = nullptr;
|
||||
private:
|
||||
char *state_int;
|
||||
char *state_int = nullptr;
|
||||
|
||||
};
|
||||
|
||||
@@ -728,6 +729,7 @@ void test_sparse3entryExpire(const RepeatInfo *info, RepeatControl *ctrl,
|
||||
|
||||
class SparseOptimalTest : public TestWithParam<tuple<u32, RepeatTestInfo> > {
|
||||
protected:
|
||||
SparseOptimalTest() = default;
|
||||
virtual void SetUp() {
|
||||
u32 period;
|
||||
tie(period, test_info) = GetParam();
|
||||
@@ -773,13 +775,13 @@ protected:
|
||||
delete[] ptr;
|
||||
}
|
||||
|
||||
RepeatTestInfo test_info; // Test params
|
||||
RepeatInfo *info; // Repeat info structure
|
||||
RepeatControl *ctrl;
|
||||
char *state;
|
||||
RepeatTestInfo test_info{}; // Test params
|
||||
RepeatInfo *info = nullptr; // Repeat info structure
|
||||
RepeatControl *ctrl = nullptr;
|
||||
char *state = nullptr;
|
||||
private:
|
||||
char *ptr;
|
||||
char *state_int;
|
||||
char *ptr = nullptr;
|
||||
char *state_int = nullptr;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user