From 84b8f32fd43fbc842bc7861d61b2a909dbace2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 27 Sep 2020 21:42:07 +0200 Subject: [PATCH] daca: group warnings for prohibited functions --- lib/checkfunctions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 5f9e5d45c..747c09e0a 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -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); } } }