Skip to content

Commit cbb769d

Browse files
committed
fixed some missing --errorlist entries [skip ci]
1 parent d296aae commit cbb769d

File tree

7 files changed

+17
-6
lines changed

7 files changed

+17
-6
lines changed

lib/checkclass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3826,4 +3826,5 @@ void CheckClass::getErrorMessages(ErrorLogger *errorLogger, const Settings *sett
38263826
c.virtualFunctionCallInConstructorError(nullptr, std::list<const Token *>(), "f");
38273827
c.thisUseAfterFree(nullptr, nullptr, nullptr);
38283828
c.unsafeClassRefMemberError(nullptr, "UnsafeClass::var");
3829+
// TODO: ctuOneDefinitionRuleViolation
38293830
}

lib/checknullpointer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,5 +719,6 @@ void CheckNullPointer::getErrorMessages(ErrorLogger *errorLogger, const Settings
719719
CheckNullPointer c(nullptr, settings, errorLogger);
720720
c.nullPointerError(nullptr, "pointer", nullptr, false);
721721
c.pointerArithmeticError(nullptr, nullptr, false);
722+
// TODO: nullPointerArithmeticOutOfMemory
722723
c.redundantConditionWarning(nullptr, nullptr, nullptr, false);
723724
}

lib/checkother.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4458,6 +4458,8 @@ void CheckOther::getErrorMessages(ErrorLogger *errorLogger, const Settings *sett
44584458
c.cstyleCastError(nullptr);
44594459
c.suspiciousFloatingPointCastError(nullptr);
44604460
c.passedByValueError(nullptr, false);
4461+
// TODO: iterateByValue
4462+
// TODO: passedByValueCallback
44614463
c.constVariableError(nullptr, nullptr);
44624464
c.constStatementError(nullptr, "type", false);
44634465
c.signedCharArrayIndexError(nullptr);
@@ -4501,8 +4503,10 @@ void CheckOther::getErrorMessages(ErrorLogger *errorLogger, const Settings *sett
45014503
c.knownArgumentError(nullptr, nullptr, nullptr, "x", false);
45024504
c.knownPointerToBoolError(nullptr, nullptr);
45034505
c.comparePointersError(nullptr, nullptr, nullptr);
4506+
// TODO: subtractPointers
45044507
c.redundantAssignmentError(nullptr, nullptr, "var", false);
45054508
c.redundantInitializationError(nullptr, nullptr, "var", false);
4509+
c.redundantContinueError(nullptr);
45064510

45074511
const std::vector<const Token *> nullvec;
45084512
c.funcArgOrderDifferent("function", nullptr, nullptr, nullvec, nullvec);

lib/checktype.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,9 @@ void CheckType::getErrorMessages(ErrorLogger *errorLogger, const Settings *setti
540540
c.tooBigBitwiseShiftError(nullptr, 32, ValueFlow::Value(64));
541541
c.tooBigSignedBitwiseShiftError(nullptr, 31, ValueFlow::Value(31));
542542
c.integerOverflowError(nullptr, ValueFlow::Value(1LL<<32));
543+
// TODO: integerOverflowCond
543544
c.signConversionError(nullptr, nullptr, false);
545+
// TODO: signConversionCond
544546
c.longCastAssignError(nullptr);
545547
c.longCastReturnError(nullptr);
546548
ValueFlow::Value f;

lib/checkuninitvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@ void CheckUninitVar::getErrorMessages(ErrorLogger* errorLogger, const Settings*
18101810

18111811
ValueFlow::Value v{};
18121812

1813-
c.uninitvarError(nullptr, v);
1813+
c.uninitvarError(nullptr, v); // TODO: does not produce any output
18141814
c.uninitdataError(nullptr, "varname");
18151815
c.uninitStructMemberError(nullptr, "a.b");
18161816
}

lib/checkunusedfunctions.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,9 @@ static bool isOperatorFunction(const std::string & funcName)
339339
return std::find(additionalOperators.cbegin(), additionalOperators.cend(), funcName.substr(operatorPrefix.length())) != additionalOperators.cend();
340340
}
341341

342-
static void staticFunctionError(ErrorLogger& errorLogger,
343-
const std::string &filename,
344-
unsigned int fileIndex,
345-
unsigned int lineNumber,
346-
const std::string &funcname)
342+
void CheckUnusedFunctions::staticFunctionError(ErrorLogger& errorLogger,
343+
const std::string &filename, unsigned int fileIndex, unsigned int lineNumber,
344+
const std::string &funcname)
347345
{
348346
std::list<ErrorMessage::FileLocation> locationList;
349347
if (!filename.empty()) {

lib/checkunusedfunctions.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class CPPCHECKLIB CheckUnusedFunctions {
5858

5959
static void getErrorMessages(ErrorLogger &errorLogger) {
6060
unusedFunctionError(errorLogger, "", 0, 0, "funcName");
61+
staticFunctionError(errorLogger, "", 0, 0, "funcName");
6162
}
6263

6364
// Return true if an error is reported.
@@ -70,6 +71,10 @@ class CPPCHECKLIB CheckUnusedFunctions {
7071
const std::string &filename, unsigned int fileIndex, unsigned int lineNumber,
7172
const std::string &funcname);
7273

74+
static void staticFunctionError(ErrorLogger& errorLogger,
75+
const std::string &filename, unsigned int fileIndex, unsigned int lineNumber,
76+
const std::string &funcname);
77+
7378
struct CPPCHECKLIB FunctionUsage {
7479
std::string filename;
7580
unsigned int lineNumber{};

0 commit comments

Comments
 (0)