Travis: Fixed Cppcheck warnings (related to #4547)
This commit is contained in:
parent
5144307642
commit
d9de7f7052
|
@ -670,14 +670,15 @@ void CheckNullPointer::nullPointerStructByDeRefAndChec()
|
|||
// count { and } using tok2
|
||||
const Token* const end2 = tok1->scope()->classEnd;
|
||||
for (const Token *tok2 = tok1->tokAt(3); tok2 != end2; tok2 = tok2->next()) {
|
||||
bool unknown = false;
|
||||
|
||||
// label / ?:
|
||||
if (tok2->str() == ":")
|
||||
break;
|
||||
|
||||
// function call..
|
||||
else if (Token::Match(tok2, "[;{}] %var% (") && CanFunctionAssignPointer(tok2->next(), varid1, unknown)) {
|
||||
else {
|
||||
bool unknown = false;
|
||||
if (Token::Match(tok2, "[;{}] %var% (") && CanFunctionAssignPointer(tok2->next(), varid1, unknown)) {
|
||||
if (!_settings->inconclusive || !unknown)
|
||||
break;
|
||||
inconclusive = true;
|
||||
|
@ -723,6 +724,7 @@ void CheckNullPointer::nullPointerStructByDeRefAndChec()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CheckNullPointer::nullPointerByDeRefAndChec()
|
||||
|
|
|
@ -71,8 +71,6 @@ std::string Settings::addEnabled(const std::string &str)
|
|||
return addEnabled(str.substr(prevPos));
|
||||
}
|
||||
|
||||
bool handled = false;
|
||||
|
||||
static std::set<std::string> id;
|
||||
if (id.empty()) {
|
||||
id.insert("warning");
|
||||
|
@ -100,7 +98,7 @@ std::string Settings::addEnabled(const std::string &str)
|
|||
if (str == "information") {
|
||||
_enabled.insert("missingInclude");
|
||||
}
|
||||
} else if (!handled) {
|
||||
} else {
|
||||
if (str.empty())
|
||||
return std::string("cppcheck: --enable parameter is empty");
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue