Skip to content

Commit 8fd396f

Browse files
committed
cli: fixed compilation
1 parent 2024842 commit 8fd396f

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ cli/singleexecutor.o: cli/singleexecutor.cpp cli/executor.h cli/singleexecutor.h
682682
cli/stacktrace.o: cli/stacktrace.cpp cli/stacktrace.h lib/config.h lib/utils.h
683683
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/stacktrace.cpp
684684

685-
cli/threadexecutor.o: cli/threadexecutor.cpp cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/timer.h lib/utils.h
685+
cli/threadexecutor.o: cli/threadexecutor.cpp cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
686686
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/threadexecutor.cpp
687687

688688
test/fixture.o: test/fixture.cpp externals/simplecpp/simplecpp.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/fixture.h test/helpers.h test/options.h test/redirect.h

cli/processexecutor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ bool ProcessExecutor::handleRead(int rpipe, unsigned int &result, const std::str
244244
suppr.isInline = true;
245245
suppr.checked = parts[1] == "1";
246246
suppr.matched = parts[2] == "1";
247-
const std::string err = mSuppressions.addSuppression(suppr);
247+
const std::string err = mSuppressions.nomsg.addSuppression(suppr);
248248
if (!err.empty()) {
249249
// TODO: only update state if it doesn't exist - otherwise propagate error
250-
mSuppressions.updateSuppressionState(suppr); // TODO: check result
250+
mSuppressions.nomsg.updateSuppressionState(suppr); // TODO: check result
251251
// TODO: make this non-fatal
252252
//std::cerr << "#### ThreadExecutor::handleRead(" << filename << ") adding of inline suppression failed - " << err << std::endl;
253253
//std::exit(EXIT_FAILURE);
@@ -344,7 +344,7 @@ unsigned int ProcessExecutor::check()
344344
// TODO: call analyseClangTidy()?
345345
}
346346

347-
pipewriter.writeSuppr(fileChecker.settings().supprs.nomsg);
347+
pipewriter.writeSuppr(mSuppressions.nomsg);
348348

349349
pipewriter.writeEnd(std::to_string(resultOfCheck));
350350
std::exit(EXIT_SUCCESS);

cli/threadexecutor.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "errorlogger.h"
2424
#include "filesettings.h"
2525
#include "settings.h"
26+
#include "suppressions.h"
2627
#include "timer.h"
2728

2829
#include <cassert>
@@ -125,20 +126,20 @@ class ThreadData
125126
result = fileChecker.check(*file);
126127
// TODO: call analyseClangTidy()?
127128
}
128-
for (const auto& suppr : fileChecker.settings().supprs.nomsg.getSuppressions()) {
129+
for (const auto& suppr : mSuppressions.nomsg.getSuppressions()) {
129130
// need to transfer all inline suppressions because these are used later on
130131
if (suppr.isInline) {
131-
const std::string err = mSuppressions.addSuppression(suppr);
132+
const std::string err = mSuppressions.nomsg.addSuppression(suppr);
132133
if (!err.empty()) {
133134
// TODO: only update state if it doesn't exist - otherwise propagate error
134-
mSuppressions.updateSuppressionState(suppr); // TODO: check result
135+
mSuppressions.nomsg.updateSuppressionState(suppr); // TODO: check result
135136
}
136137
continue;
137138
}
138139

139140
// propagate state of global suppressions
140141
if (!suppr.isLocal()) {
141-
mSuppressions.updateSuppressionState(suppr); // TODO: check result
142+
mSuppressions.nomsg.updateSuppressionState(suppr); // TODO: check result
142143
continue;
143144
}
144145
}

0 commit comments

Comments
 (0)