Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Aug 29, 2024
1 parent 4032acf commit ccc2abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/cppcheckexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ int CppCheckExecutor::check_internal(const Settings& settings) const
stdLogger.reportErr(ErrorMessage::getXMLFooter());
}

if (settings.safety && (stdLogger.hasCriticalErrors() || returnValue != 0))
if (settings.safety && stdLogger.hasCriticalErrors())
return EXIT_FAILURE;

if (returnValue)
Expand Down
5 changes: 3 additions & 2 deletions lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1635,8 +1635,9 @@ void CppCheck::reportErr(const ErrorMessage &msg)
if (!mSettings.buildDir.empty())
mAnalyzerInformation.reportErr(msg);

if (!mSettings.supprs.nofail.isSuppressed(errorMessage) && !mSettings.supprs.nomsg.isSuppressed(errorMessage))
mExitCode = mSettings.exitCode;
if (!mSettings.supprs.nofail.isSuppressed(errorMessage) && !mSettings.supprs.nomsg.isSuppressed(errorMessage)) {
mExitCode = 1;
}

std::string remark;
if (!msg.callStack.empty()) {
Expand Down

0 comments on commit ccc2abe

Please sign in to comment.