Fix return value from ErrorLogger::reportUnmatchedSuppressions

This commit is contained in:
Daniel Marjamäki 2019-01-22 06:45:22 +01:00
parent 6f62b83fe6
commit 149d688e9a
1 changed files with 3 additions and 0 deletions

View File

@ -538,6 +538,7 @@ std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string
bool ErrorLogger::reportUnmatchedSuppressions(const std::list<Suppressions::Suppression> &unmatched)
{
bool err = false;
// Report unmatched suppressions
for (const Suppressions::Suppression &s : unmatched) {
// don't report "unmatchedSuppression" as unmatched
@ -563,7 +564,9 @@ bool ErrorLogger::reportUnmatchedSuppressions(const std::list<Suppressions::Supp
if (!s.fileName.empty())
callStack.emplace_back(s.fileName, s.lineNumber);
reportErr(ErrorLogger::ErrorMessage(callStack, emptyString, Severity::information, "Unmatched suppression: " + s.errorId, "unmatchedSuppression", false));
err = true;
}
return err;
}
std::string ErrorLogger::callStackToString(const std::list<ErrorLogger::ErrorMessage::FileLocation> &callStack)