Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Dec 18, 2023
1 parent 5fac3ce commit 3732fc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/cppcheckexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck) const
cppcheck.tooManyConfigsError(emptyString,0U);
}

if (false) // <- TODO: settings.safety
if (settings.severity.isEnabled(Severity::information)) // <- TODO: settings.safety
mStdLogger->writeCheckersReport();

if (settings.xml) {
Expand Down
11 changes: 7 additions & 4 deletions lib/suppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

#include "xml.h"

static const char ID_UNUSEDFUNCTION[] = "unusedFunction";
static const char ID_CHECKERSREPORT[] = "checkersReport";

Suppressions::ErrorMessage Suppressions::ErrorMessage::fromErrorMessage(const ::ErrorMessage &msg, const std::set<std::string> &macroNames)
{
Suppressions::ErrorMessage ret;
Expand Down Expand Up @@ -455,9 +458,9 @@ std::list<Suppressions::Suppression> Suppressions::getUnmatchedLocalSuppressions
continue;
if (s.hash > 0)
continue;
if (s.errorId == "checkersReport")
if (s.errorId == ID_CHECKERSREPORT)
continue;
if (!unusedFunctionChecking && s.errorId == "unusedFunction")
if (!unusedFunctionChecking && s.errorId == ID_UNUSEDFUNCTION)
continue;
if (tmpFile.empty() || !s.isLocal() || s.fileName != tmpFile)
continue;
Expand All @@ -474,9 +477,9 @@ std::list<Suppressions::Suppression> Suppressions::getUnmatchedGlobalSuppression
continue;
if (s.hash > 0)
continue;
if (!unusedFunctionChecking && s.errorId == "unusedFunction")
if (!unusedFunctionChecking && s.errorId == ID_UNUSEDFUNCTION)
continue;
if (s.errorId == "checkersReport")
if (s.errorId == ID_CHECKERSREPORT)
continue;
if (s.isLocal())
continue;
Expand Down

0 comments on commit 3732fc1

Please sign in to comment.