Skip to content

Commit e3dc74d

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

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
@@ -3825,4 +3825,5 @@ void CheckClass::getErrorMessages(ErrorLogger *errorLogger, const Settings *sett
38253825
c.virtualFunctionCallInConstructorError(nullptr, std::list<const Token *>(), "f");
38263826
c.thisUseAfterFree(nullptr, nullptr, nullptr);
38273827
c.unsafeClassRefMemberError(nullptr, "UnsafeClass::var");
3828+
// TODO: ctuOneDefinitionRuleViolation
38283829
}

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
@@ -4441,6 +4441,8 @@ void CheckOther::getErrorMessages(ErrorLogger *errorLogger, const Settings *sett
44414441
c.cstyleCastError(nullptr);
44424442
c.suspiciousFloatingPointCastError(nullptr);
44434443
c.passedByValueError(nullptr, false);
4444+
// TODO: iterateByValue
4445+
// TODO: passedByValueCallback
44444446
c.constVariableError(nullptr, nullptr);
44454447
c.constStatementError(nullptr, "type", false);
44464448
c.signedCharArrayIndexError(nullptr);
@@ -4484,8 +4486,10 @@ void CheckOther::getErrorMessages(ErrorLogger *errorLogger, const Settings *sett
44844486
c.knownArgumentError(nullptr, nullptr, nullptr, "x", false);
44854487
c.knownPointerToBoolError(nullptr, nullptr);
44864488
c.comparePointersError(nullptr, nullptr, nullptr);
4489+
// TODO: subtractPointers
44874490
c.redundantAssignmentError(nullptr, nullptr, "var", false);
44884491
c.redundantInitializationError(nullptr, nullptr, "var", false);
4492+
c.redundantContinueError(nullptr);
44894493

44904494
const std::vector<const Token *> nullvec;
44914495
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
@@ -1809,7 +1809,7 @@ void CheckUninitVar::getErrorMessages(ErrorLogger* errorLogger, const Settings*
18091809

18101810
ValueFlow::Value v{};
18111811

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

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)