Refactoring (compiler warnings and a typo)
This commit is contained in:
parent
d4550c763d
commit
729b240d9c
|
@ -2221,7 +2221,7 @@ void CheckOther::checkDuplicateExpression()
|
||||||
if (assignment)
|
if (assignment)
|
||||||
selfAssignmentError(tok, tok->astOperand1()->expressionString());
|
selfAssignmentError(tok, tok->astOperand1()->expressionString());
|
||||||
else {
|
else {
|
||||||
if (_tokenizer->isCPP() && _settings->standards.CPP11 && tok->str() == "==") {
|
if (_tokenizer->isCPP() && _settings->standards.cpp==Standards::CPP11 && tok->str() == "==") {
|
||||||
const Token* parent = tok->astParent();
|
const Token* parent = tok->astParent();
|
||||||
while (parent && parent->astParent()) {
|
while (parent && parent->astParent()) {
|
||||||
parent = parent->astParent();
|
parent = parent->astParent();
|
||||||
|
|
|
@ -871,7 +871,7 @@ static bool valueFlowForward(Token * const startToken,
|
||||||
|
|
||||||
// Should scope be skipped because variable value is checked?
|
// Should scope be skipped because variable value is checked?
|
||||||
std::list<ValueFlow::Value> truevalues;
|
std::list<ValueFlow::Value> truevalues;
|
||||||
for (std::list<ValueFlow::Value>::iterator it = values.begin(); it != values.end(); ++it) {
|
for (std::list<ValueFlow::Value>::const_iterator it = values.begin(); it != values.end(); ++it) {
|
||||||
if (!conditionIsFalse(tok2->next()->astOperand2(), getProgramMemory(tok2, varid, *it)))
|
if (!conditionIsFalse(tok2->next()->astOperand2(), getProgramMemory(tok2, varid, *it)))
|
||||||
truevalues.push_back(*it);
|
truevalues.push_back(*it);
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ private:
|
||||||
void longCastAssign() {
|
void longCastAssign() {
|
||||||
Settings settings;
|
Settings settings;
|
||||||
settings.addEnabled("style");
|
settings.addEnabled("style");
|
||||||
settings.platform(Settings::PlatformType::Unix64);
|
settings.platform(Settings::Unix64);
|
||||||
|
|
||||||
check("long f(int x, int y) {\n"
|
check("long f(int x, int y) {\n"
|
||||||
" const long ret = x * y;\n"
|
" const long ret = x * y;\n"
|
||||||
|
|
Loading…
Reference in New Issue