Skip to content

Commit 7721083

Browse files
committed
Removed unused variable CppCheck::_errout.
1 parent 4df6ad1 commit 7721083

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

cli/cppcheckexecutor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "preprocessor.h"
2323
#include "errorlogger.h"
2424
#include <iostream>
25+
#include <sstream>
2526
#include <cstdlib> // EXIT_SUCCESS and EXIT_FAILURE
2627
#include <cstring>
2728
#include <algorithm>

lib/cppcheck.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <algorithm>
2727
#include <fstream>
28+
#include <sstream>
2829
#include <stdexcept>
2930
#include "timer.h"
3031

@@ -147,8 +148,6 @@ unsigned int CppCheck::processFile(const std::string& filename)
147148
analyseFile(f, filename);
148149
}
149150

150-
_errout.str("");
151-
152151
if (_settings.terminated())
153152
return exitcode;
154153

@@ -258,7 +257,6 @@ void CppCheck::checkFunctionUsage()
258257
const bool verbose_orig = _settings._verbose;
259258
_settings._verbose = false;
260259

261-
_errout.str("");
262260
if (_settings._errorsOnly == false)
263261
_errorLogger.reportOut("Checking usage of global functions..");
264262

@@ -497,8 +495,6 @@ void CppCheck::reportErr(const ErrorLogger::ErrorMessage &msg)
497495
}
498496

499497
_errorLogger.reportErr(msg);
500-
501-
_errout << errmsg << std::endl;
502498
}
503499

504500
void CppCheck::reportOut(const std::string &outmsg)

lib/cppcheck.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include <string>
2727
#include <list>
28-
#include <sstream>
28+
#include <istream>
2929

3030
/// @addtogroup Core
3131
/// @{
@@ -169,7 +169,6 @@ class CppCheck : ErrorLogger {
169169

170170
unsigned int exitcode;
171171
std::list<std::string> _errorList;
172-
std::ostringstream _errout;
173172
Settings _settings;
174173
bool _useGlobalSuppressions;
175174
std::string _fileContent;

0 commit comments

Comments
 (0)