diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 8732c6908..b8749cc8f 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -5439,10 +5439,14 @@ static void valueFlowSafeFunctions(TokenList *tokenlist, SymbolDatabase *symbold } std::list argValues; - if (isLow) + if (isLow) { argValues.emplace_back(low); - if (isHigh) + argValues.back().errorPath.emplace_back(arg.nameToken(), "Assuming argument has value " + MathLib::toString(low)); + } + if (isHigh) { argValues.emplace_back(high); + argValues.back().errorPath.emplace_back(arg.nameToken(), "Assuming argument has value " + MathLib::toString(high)); + } if (!argValues.empty()) valueFlowForward(const_cast(functionScope->bodyStart->next()),