daca: group warnings for prohibited functions

This commit is contained in:
Daniel Marjamäki 2020-09-27 21:42:07 +02:00
parent 2748201d73
commit 84b8f32fd4
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,8 @@ void CheckFunctions::checkProhibitedFunctions()
const Library::WarnInfo* wi = mSettings->library.getWarnInfo(tok);
if (wi) {
if (mSettings->isEnabled(wi->severity) && mSettings->standards.c >= wi->standards.c && mSettings->standards.cpp >= wi->standards.cpp) {
reportError(tok, wi->severity, tok->str() + "Called", wi->message, CWE477, false);
const std::string daca = mSettings->daca ? "prohibited" : "";
reportError(tok, wi->severity, daca + tok->str() + "Called", wi->message, CWE477, false);
}
}
}