diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 0826db497..a8aaa33f4 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2221,7 +2221,7 @@ void CheckOther::checkDuplicateExpression() if (assignment) selfAssignmentError(tok, tok->astOperand1()->expressionString()); else { - if (_tokenizer->isCPP() && _settings->standards.CPP11 && tok->str() == "==") { + if (_tokenizer->isCPP() && _settings->standards.cpp==Standards::CPP11 && tok->str() == "==") { const Token* parent = tok->astParent(); while (parent && parent->astParent()) { parent = parent->astParent(); diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 7e8ce2ef4..8cfeda710 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -871,7 +871,7 @@ static bool valueFlowForward(Token * const startToken, // Should scope be skipped because variable value is checked? std::list truevalues; - for (std::list::iterator it = values.begin(); it != values.end(); ++it) { + for (std::list::const_iterator it = values.begin(); it != values.end(); ++it) { if (!conditionIsFalse(tok2->next()->astOperand2(), getProgramMemory(tok2, varid, *it))) truevalues.push_back(*it); } diff --git a/test/testtype.cpp b/test/testtype.cpp index 5acc7795d..d5c1da84d 100644 --- a/test/testtype.cpp +++ b/test/testtype.cpp @@ -140,7 +140,7 @@ private: void longCastAssign() { Settings settings; settings.addEnabled("style"); - settings.platform(Settings::PlatformType::Unix64); + settings.platform(Settings::Unix64); check("long f(int x, int y) {\n" " const long ret = x * y;\n"