Temporarily suppress Cppcheck false positives
This commit is contained in:
parent
022259caf3
commit
e6edd74099
|
@ -156,7 +156,7 @@ script:
|
|||
- cd ../
|
||||
# use same hack as for clang to work around cppchecks broken exit status with -j 2 ; create file, tee everything to the file and stdout, grep for errors in the file
|
||||
- touch /tmp/cppcheck.cppcheck
|
||||
- ${CPPCHECK} --error-exitcode=1 --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --enable=style,performance,portability,warning,internal --exception-handling --suppressions-list=.travis_suppressions -itest/synthetic -iaddons -igui . -j 2 |& tee /tmp/cppcheck.cppcheck
|
||||
- ${CPPCHECK} --error-exitcode=1 --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --enable=style,performance,portability,warning,internal --exception-handling --inline-suppr --suppressions-list=.travis_suppressions -itest/synthetic -iaddons -igui . -j 2 |& tee /tmp/cppcheck.cppcheck
|
||||
# check gui with qt settings
|
||||
- ${CPPCHECK} --library=qt --error-exitcode=1 -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --enable=style,performance,portability,warning,internal --exception-handling -j 2 gui --suppressions-list=.travis_suppressions -igui/test |& tee --append /tmp/cppcheck.cppcheck
|
||||
- sh -c "! grep '^\[' /tmp/cppcheck.cppcheck"
|
||||
|
|
|
@ -2413,6 +2413,7 @@ void CheckClass::pureVirtualFunctionCallInConstructorError(
|
|||
for (const Token *tok : tokStack)
|
||||
errorPath.emplace_back(tok, "Calling " + tok->str());
|
||||
if (!errorPath.empty())
|
||||
// cppcheck-suppress unreadVariable // FP
|
||||
errorPath.back().second = purefuncname + " is a pure virtual method without body";
|
||||
|
||||
reportError(tokStack, Severity::warning, "pureVirtualCall",
|
||||
|
|
|
@ -213,6 +213,7 @@ void CTU::FileInfo::loadFromXml(const tinyxml2::XMLElement *xmlElement)
|
|||
if (std::strcmp(e->Name(), "function-call") == 0) {
|
||||
FunctionCall functionCall;
|
||||
if (functionCall.loadFromXml(e))
|
||||
// cppcheck-suppress uninitStructMember // FP
|
||||
functionCalls.push_back(functionCall);
|
||||
} else if (std::strcmp(e->Name(), "nested-call") == 0) {
|
||||
NestedCall nestedCall;
|
||||
|
|
|
@ -822,7 +822,8 @@ void Preprocessor::getErrorMessages(ErrorLogger *errorLogger, const Settings *se
|
|||
{
|
||||
Settings settings2(*settings);
|
||||
Preprocessor preprocessor(settings2, errorLogger);
|
||||
settings2.checkConfiguration=true;
|
||||
// cppcheck-suppress unreadVariable // FP
|
||||
settings2.checkConfiguration = true;
|
||||
preprocessor.missingInclude(emptyString, 1, emptyString, UserHeader);
|
||||
preprocessor.missingInclude(emptyString, 1, emptyString, SystemHeader);
|
||||
preprocessor.validateCfgError(emptyString, 1, "X", "X");
|
||||
|
|
Loading…
Reference in New Issue