diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index bf0c6411d..a7db0baca 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -216,15 +216,15 @@ void CheckFunctions::checkIgnoredReturnValue() } if ((!tok->function() || !Token::Match(tok->function()->retDef, "void %name%")) && - !WRONG_DATA(!tok->next()->astOperand1(), tok)) { + !WRONG_DATA(!tok->next()->astOperand1(), tok)) { const Library::UseRetValType retvalTy = mSettings->library.getUseRetValType(tok); if (mSettings->isEnabled(Settings::WARNING) && ((retvalTy == Library::UseRetValType::DEFAULT) || - (tok->function() && tok->function()->isAttributeNodiscard()))) - ignoredReturnValueError(tok, tok->next()->astOperand1()->expressionString()); + (tok->function() && tok->function()->isAttributeNodiscard()))) + ignoredReturnValueError(tok, tok->next()->astOperand1()->expressionString()); else if (mSettings->isEnabled(Settings::STYLE) && retvalTy == Library::UseRetValType::ERROR_CODE) - ignoredReturnErrorCode(tok, tok->next()->astOperand1()->expressionString()); + ignoredReturnErrorCode(tok, tok->next()->astOperand1()->expressionString()); } } } diff --git a/lib/suppressions.cpp b/lib/suppressions.cpp index c2122da20..18165ab32 100644 --- a/lib/suppressions.cpp +++ b/lib/suppressions.cpp @@ -219,8 +219,8 @@ std::string Suppressions::addSuppressionLine(const std::string &line) std::string Suppressions::addSuppression(const Suppressions::Suppression &suppression) { // Check if suppression is already in list - auto foundSuppression = std::find_if(mSuppressions.begin(), mSuppressions.end(), - std::bind(&Suppression::isSameParameters, &suppression, std::placeholders::_1)); + auto foundSuppression = std::find_if(mSuppressions.begin(), mSuppressions.end(), + std::bind(&Suppression::isSameParameters, &suppression, std::placeholders::_1)); if (foundSuppression != mSuppressions.end()) { // Update matched state of existing global suppression if (!suppression.isLocal() && suppression.matched) diff --git a/lib/suppressions.h b/lib/suppressions.h index 71e473003..2f3b5681d 100644 --- a/lib/suppressions.h +++ b/lib/suppressions.h @@ -102,11 +102,11 @@ public: bool isSameParameters(const Suppression &other) const { return errorId == other.errorId && - fileName == other.fileName && - lineNumber == other.lineNumber && - symbolName == other.symbolName && - hash == other.hash && - thisAndNextLine == other.thisAndNextLine; + fileName == other.fileName && + lineNumber == other.lineNumber && + symbolName == other.symbolName && + hash == other.hash && + thisAndNextLine == other.thisAndNextLine; } std::string errorId; diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 0c5d69ae8..50a7c917c 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -596,8 +596,8 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value, const Setti value2.isIntValue())) { ValueFlow::Value result(0); combineValueProperties(value1, value2, &result); - const float floatValue1 = value1.isIntValue() ? value1.intvalue : value1.floatValue; - const float floatValue2 = value2.isIntValue() ? value2.intvalue : value2.floatValue; + const double floatValue1 = value1.isIntValue() ? value1.intvalue : value1.floatValue; + const double floatValue2 = value2.isIntValue() ? value2.intvalue : value2.floatValue; switch (parent->str()[0]) { case '+': if (value1.isTokValue() || value2.isTokValue())