use simplifyPath() to make sure file name is same as in the checks

This commit is contained in:
Jens Yllman 2020-07-28 22:19:27 +02:00
parent 686a1bec99
commit 62f5f248be
1 changed files with 2 additions and 1 deletions

View File

@ -373,6 +373,7 @@ void Suppressions::dump(std::ostream & out) const
std::list<Suppressions::Suppression> Suppressions::getUnmatchedLocalSuppressions(const std::string &file, const bool unusedFunctionChecking) const
{
std::string tmp_file = Path::simplifyPath(file);
std::list<Suppression> result;
for (const Suppression &s : mSuppressions) {
if (s.matched)
@ -381,7 +382,7 @@ std::list<Suppressions::Suppression> Suppressions::getUnmatchedLocalSuppressions
continue;
if (!unusedFunctionChecking && s.errorId == "unusedFunction")
continue;
if (file.empty() || !s.isLocal() || s.fileName != file)
if (tmp_file.empty() || !s.isLocal() || s.fileName != tmp_file)
continue;
result.push_back(s);
}