diff --git a/Makefile b/Makefile
index 2eff14854..a89737473 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ OBJECTS = src/checkbufferoverrun.o \
src/checkother.o \
src/cppcheck.o \
src/cppcheckexecutor.o \
- src/errormessage.o \
+ src/errorlogger.o \
src/filelister.o \
src/main.o \
src/preprocessor.o \
@@ -52,7 +52,7 @@ TESTOBJ = test/testbufferoverrun.o \
src/checkother.o \
src/cppcheck.o \
src/cppcheckexecutor.o \
- src/errormessage.o \
+ src/errorlogger.o \
src/filelister.o \
src/preprocessor.o \
src/settings.o \
@@ -91,40 +91,40 @@ install: cppcheck
###### Build
-src/checkbufferoverrun.o: src/checkbufferoverrun.cpp src/checkbufferoverrun.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/errormessage.h
+src/checkbufferoverrun.o: src/checkbufferoverrun.cpp src/checkbufferoverrun.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
g++ $(CXXFLAGS) -c -o src/checkbufferoverrun.o src/checkbufferoverrun.cpp
-src/checkclass.o: src/checkclass.cpp src/checkclass.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/errormessage.h
+src/checkclass.o: src/checkclass.cpp src/checkclass.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
g++ $(CXXFLAGS) -c -o src/checkclass.o src/checkclass.cpp
-src/checkdangerousfunctions.o: src/checkdangerousfunctions.cpp src/checkdangerousfunctions.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/errormessage.h
+src/checkdangerousfunctions.o: src/checkdangerousfunctions.cpp src/checkdangerousfunctions.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
g++ $(CXXFLAGS) -c -o src/checkdangerousfunctions.o src/checkdangerousfunctions.cpp
-src/checkfunctionusage.o: src/checkfunctionusage.cpp src/checkfunctionusage.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/errormessage.h
+src/checkfunctionusage.o: src/checkfunctionusage.cpp src/checkfunctionusage.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
g++ $(CXXFLAGS) -c -o src/checkfunctionusage.o src/checkfunctionusage.cpp
src/checkheaders.o: src/checkheaders.cpp src/checkheaders.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/filelister.h
g++ $(CXXFLAGS) -c -o src/checkheaders.o src/checkheaders.cpp
-src/checkmemoryleak.o: src/checkmemoryleak.cpp src/checkmemoryleak.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/errormessage.h
+src/checkmemoryleak.o: src/checkmemoryleak.cpp src/checkmemoryleak.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
g++ $(CXXFLAGS) -c -o src/checkmemoryleak.o src/checkmemoryleak.cpp
-src/checkother.o: src/checkother.cpp src/checkother.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/errormessage.h
+src/checkother.o: src/checkother.cpp src/checkother.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
g++ $(CXXFLAGS) -c -o src/checkother.o src/checkother.cpp
-src/cppcheck.o: src/cppcheck.cpp src/cppcheck.h src/settings.h src/errorlogger.h src/checkfunctionusage.h src/tokenize.h src/token.h src/preprocessor.h src/checkmemoryleak.h src/checkbufferoverrun.h src/checkdangerousfunctions.h src/checkclass.h src/checkheaders.h src/checkother.h src/filelister.h src/errormessage.h
+src/cppcheck.o: src/cppcheck.cpp src/cppcheck.h src/settings.h src/errorlogger.h src/checkfunctionusage.h src/tokenize.h src/token.h src/preprocessor.h src/checkmemoryleak.h src/checkbufferoverrun.h src/checkdangerousfunctions.h src/checkclass.h src/checkheaders.h src/checkother.h src/filelister.h
g++ $(CXXFLAGS) -c -o src/cppcheck.o src/cppcheck.cpp
-src/cppcheckexecutor.o: src/cppcheckexecutor.cpp src/cppcheckexecutor.h src/errorlogger.h src/cppcheck.h src/settings.h src/checkfunctionusage.h src/tokenize.h src/token.h
+src/cppcheckexecutor.o: src/cppcheckexecutor.cpp src/cppcheckexecutor.h src/errorlogger.h src/settings.h src/cppcheck.h src/checkfunctionusage.h src/tokenize.h src/token.h
g++ $(CXXFLAGS) -c -o src/cppcheckexecutor.o src/cppcheckexecutor.cpp
-src/errormessage.o: src/errormessage.cpp src/errormessage.h src/settings.h src/errorlogger.h src/tokenize.h src/token.h
- g++ $(CXXFLAGS) -c -o src/errormessage.o src/errormessage.cpp
+src/errorlogger.o: src/errorlogger.cpp src/errorlogger.h src/settings.h src/tokenize.h src/token.h
+ g++ $(CXXFLAGS) -c -o src/errorlogger.o src/errorlogger.cpp
src/filelister.o: src/filelister.cpp src/filelister.h
g++ $(CXXFLAGS) -c -o src/filelister.o src/filelister.cpp
-src/main.o: src/main.cpp src/cppcheckexecutor.h src/errorlogger.h
+src/main.o: src/main.cpp src/cppcheckexecutor.h src/errorlogger.h src/settings.h
g++ $(CXXFLAGS) -c -o src/main.o src/main.cpp
src/preprocessor.o: src/preprocessor.cpp src/preprocessor.h src/tokenize.h src/settings.h src/errorlogger.h src/token.h
@@ -151,7 +151,7 @@ test/testclass.o: test/testclass.cpp src/tokenize.h src/settings.h src/errorlogg
test/testconstructors.o: test/testconstructors.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkclass.h test/testsuite.h
g++ $(CXXFLAGS) -c -o test/testconstructors.o test/testconstructors.cpp
-test/testcppcheck.o: test/testcppcheck.cpp test/testsuite.h src/errorlogger.h src/cppcheck.h src/settings.h src/checkfunctionusage.h src/tokenize.h src/token.h
+test/testcppcheck.o: test/testcppcheck.cpp test/testsuite.h src/errorlogger.h src/settings.h src/cppcheck.h src/checkfunctionusage.h src/tokenize.h src/token.h
g++ $(CXXFLAGS) -c -o test/testcppcheck.o test/testcppcheck.cpp
test/testdangerousfunctions.o: test/testdangerousfunctions.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkdangerousfunctions.h test/testsuite.h
@@ -160,13 +160,13 @@ test/testdangerousfunctions.o: test/testdangerousfunctions.cpp src/tokenize.h sr
test/testdivision.o: test/testdivision.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkother.h test/testsuite.h
g++ $(CXXFLAGS) -c -o test/testdivision.o test/testdivision.cpp
-test/testfilelister.o: test/testfilelister.cpp test/testsuite.h src/errorlogger.h src/filelister.h
+test/testfilelister.o: test/testfilelister.cpp test/testsuite.h src/errorlogger.h src/settings.h src/filelister.h
g++ $(CXXFLAGS) -c -o test/testfilelister.o test/testfilelister.cpp
test/testfunctionusage.o: test/testfunctionusage.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h test/testsuite.h src/checkfunctionusage.h
g++ $(CXXFLAGS) -c -o test/testfunctionusage.o test/testfunctionusage.cpp
-test/testincompletestatement.o: test/testincompletestatement.cpp test/testsuite.h src/errorlogger.h src/tokenize.h src/settings.h src/token.h src/checkother.h
+test/testincompletestatement.o: test/testincompletestatement.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/token.h src/checkother.h
g++ $(CXXFLAGS) -c -o test/testincompletestatement.o test/testincompletestatement.cpp
test/testmemleak.o: test/testmemleak.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkmemoryleak.h test/testsuite.h
@@ -178,34 +178,34 @@ test/testmemleakmp.o: test/testmemleakmp.cpp src/tokenize.h src/settings.h src/e
test/testother.o: test/testother.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkother.h test/testsuite.h
g++ $(CXXFLAGS) -c -o test/testother.o test/testother.cpp
-test/testpreprocessor.o: test/testpreprocessor.cpp test/testsuite.h src/errorlogger.h src/preprocessor.h
+test/testpreprocessor.o: test/testpreprocessor.cpp test/testsuite.h src/errorlogger.h src/settings.h src/preprocessor.h
g++ $(CXXFLAGS) -c -o test/testpreprocessor.o test/testpreprocessor.cpp
test/testredundantif.o: test/testredundantif.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkother.h test/testsuite.h
g++ $(CXXFLAGS) -c -o test/testredundantif.o test/testredundantif.cpp
-test/testrunner.o: test/testrunner.cpp test/testsuite.h src/errorlogger.h
+test/testrunner.o: test/testrunner.cpp test/testsuite.h src/errorlogger.h src/settings.h
g++ $(CXXFLAGS) -c -o test/testrunner.o test/testrunner.cpp
-test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h src/errorlogger.h src/tokenize.h src/settings.h src/token.h
+test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/token.h
g++ $(CXXFLAGS) -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp
-test/testsuite.o: test/testsuite.cpp test/testsuite.h src/errorlogger.h
+test/testsuite.o: test/testsuite.cpp test/testsuite.h src/errorlogger.h src/settings.h
g++ $(CXXFLAGS) -c -o test/testsuite.o test/testsuite.cpp
-test/testtoken.o: test/testtoken.cpp test/testsuite.h src/errorlogger.h src/token.h
+test/testtoken.o: test/testtoken.cpp test/testsuite.h src/errorlogger.h src/settings.h src/token.h
g++ $(CXXFLAGS) -c -o test/testtoken.o test/testtoken.cpp
-test/testtokenize.o: test/testtokenize.cpp test/testsuite.h src/errorlogger.h src/tokenize.h src/settings.h src/token.h
+test/testtokenize.o: test/testtokenize.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/token.h
g++ $(CXXFLAGS) -c -o test/testtokenize.o test/testtokenize.cpp
test/testunusedprivfunc.o: test/testunusedprivfunc.cpp src/tokenize.h src/settings.h src/errorlogger.h src/token.h src/checkclass.h test/testsuite.h
g++ $(CXXFLAGS) -c -o test/testunusedprivfunc.o test/testunusedprivfunc.cpp
-test/testunusedvar.o: test/testunusedvar.cpp test/testsuite.h src/errorlogger.h src/tokenize.h src/settings.h src/token.h src/checkother.h
+test/testunusedvar.o: test/testunusedvar.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/token.h src/checkother.h
g++ $(CXXFLAGS) -c -o test/testunusedvar.o test/testunusedvar.cpp
-src/errormessage.h: tools/errmsg
+src/errorlogger.h: tools/errmsg
tools/errmsg
- mv errormessage.h src/
+ mv errorlogger.h src/
diff --git a/cppcheck.cbp b/cppcheck.cbp
index d387d89b0..6ff0d7131 100644
--- a/cppcheck.cbp
+++ b/cppcheck.cbp
@@ -49,8 +49,6 @@
-
-
diff --git a/src/checkbufferoverrun.cpp b/src/checkbufferoverrun.cpp
index 06bad51ff..ec595fa9b 100644
--- a/src/checkbufferoverrun.cpp
+++ b/src/checkbufferoverrun.cpp
@@ -22,7 +22,6 @@
//---------------------------------------------------------------------------
#include "checkbufferoverrun.h"
-#include "errormessage.h"
#include
#include
@@ -52,7 +51,7 @@ CheckBufferOverrunClass::~CheckBufferOverrunClass()
void CheckBufferOverrunClass::arrayIndexOutOfBounds(const Token *tok)
{
_callStack.push_back(tok);
- ErrorMessage::arrayIndexOutOfBounds(_errorLogger, _tokenizer, _callStack);
+ _errorLogger->arrayIndexOutOfBounds(_tokenizer, _callStack);
_callStack.pop_back();
}
//---------------------------------------------------------------------------
@@ -154,7 +153,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_CheckScope(const Token *tok, co
const char *num = tok->strAt(6);
if (std::atoi(num) > total_size)
{
- ErrorMessage::bufferOverrun(_errorLogger, _tokenizer, tok);
+ _errorLogger->bufferOverrun(_tokenizer, tok);
}
}
continue;
@@ -168,7 +167,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_CheckScope(const Token *tok, co
const char *num = tok->strAt(varc + 6);
if (std::atoi(num) > total_size)
{
- ErrorMessage::bufferOverrun(_errorLogger, _tokenizer, tok);
+ _errorLogger->bufferOverrun(_tokenizer, tok);
}
}
continue;
@@ -227,7 +226,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_CheckScope(const Token *tok, co
if (Token::Match(tok2, pattern.str().c_str()))
{
- ErrorMessage::bufferOverrun(_errorLogger, _tokenizer, tok2);
+ _errorLogger->bufferOverrun(_tokenizer, tok2);
break;
}
@@ -250,7 +249,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_CheckScope(const Token *tok, co
}
if (len > 2 && len >= (int)size + 2)
{
- ErrorMessage::bufferOverrun(_errorLogger, _tokenizer, tok);
+ _errorLogger->bufferOverrun(_tokenizer, tok);
}
continue;
}
@@ -276,7 +275,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_CheckScope(const Token *tok, co
}
if (len > (int)size)
{
- ErrorMessage::bufferOverrun(_errorLogger, _tokenizer, tok);
+ _errorLogger->bufferOverrun(_tokenizer, tok);
}
}
@@ -285,7 +284,7 @@ void CheckBufferOverrunClass::CheckBufferOverrun_CheckScope(const Token *tok, co
{
int n = std::atoi(tok->strAt(4));
if (n > size)
- ErrorMessage::outOfBounds(_errorLogger, _tokenizer, tok->tokAt(4), "snprintf size");
+ _errorLogger->outOfBounds(_tokenizer, tok->tokAt(4), "snprintf size");
}
diff --git a/src/checkclass.cpp b/src/checkclass.cpp
index eac6627f6..2709e10f1 100644
--- a/src/checkclass.cpp
+++ b/src/checkclass.cpp
@@ -20,8 +20,6 @@
//---------------------------------------------------------------------------
#include "checkclass.h"
-#include "errormessage.h"
-
#include
#include
@@ -381,13 +379,13 @@ void CheckClass::constructors()
if (! constructor_token)
{
// If "--style" has been given, give a warning
- if (ErrorMessage::noConstructor(_settings))
+ if (ErrorLogger::noConstructor(_settings))
{
// If the class has member variables there should be an constructor
struct VAR *varlist = ClassChecking_GetVarList(tok1);
if (varlist)
{
- ErrorMessage::noConstructor(_errorLogger, _tokenizer, tok1, classNameToken->str());
+ _errorLogger->noConstructor(_tokenizer, tok1, classNameToken->str());
}
// Delete the varlist..
while (varlist)
@@ -446,7 +444,7 @@ void CheckClass::CheckConstructors(const Token *tok1, struct VAR *varlist, const
continue;
// It's non-static and it's not initialized => error
- ErrorMessage::uninitVar(_errorLogger, _tokenizer, constructor_token, className, var->name);
+ _errorLogger->uninitVar(_tokenizer, constructor_token, className, var->name);
}
for (struct VAR *var = varlist; var; var = var->next)
@@ -577,7 +575,7 @@ void CheckClass::privateFunctions()
const std::string _pattern("return|(|)|,|= " + FuncList.front()->str());
if (!Token::findmatch(_tokenizer->tokens(), _pattern.c_str()))
{
- ErrorMessage::unusedPrivateFunction(_errorLogger, _tokenizer, FuncList.front(), classname, FuncList.front()->str());
+ _errorLogger->unusedPrivateFunction(_tokenizer, FuncList.front(), classname, FuncList.front()->str());
}
FuncList.pop_front();
}
@@ -617,7 +615,7 @@ void CheckClass::noMemset()
const std::string pattern1(std::string("class ") + type);
if (Token::findmatch(_tokenizer->tokens(), pattern1.c_str()))
{
- ErrorMessage::memsetClass(_errorLogger, _tokenizer, tok, tok->str());
+ _errorLogger->memsetClass(_tokenizer, tok, tok->str());
continue;
}
@@ -630,7 +628,7 @@ void CheckClass::noMemset()
if (Token::Match(tstruct, "std :: %type% %var% ;"))
{
- ErrorMessage::memsetStruct(_errorLogger, _tokenizer, tok, tok->str(), tstruct->strAt(2));
+ _errorLogger->memsetStruct(_tokenizer, tok, tok->str(), tstruct->strAt(2));
break;
}
}
@@ -650,7 +648,7 @@ void CheckClass::operatorEq()
const Token *tok = Token::findmatch(_tokenizer->tokens(), "void operator = (");
if (tok)
{
- ErrorMessage::operatorEq(_errorLogger, _tokenizer, tok);
+ _errorLogger->operatorEq(_tokenizer, tok);
}
}
//---------------------------------------------------------------------------
@@ -731,14 +729,14 @@ void CheckClass::virtualDestructor()
base = Token::findmatch(_tokenizer->tokens(), (std::string("class ") + baseName[0] + " :|{").c_str());
if (base)
{
- ErrorMessage::virtualDestructor(_errorLogger, _tokenizer, base, baseName[0], derivedClass->str());
+ _errorLogger->virtualDestructor(_tokenizer, base, baseName[0], derivedClass->str());
}
}
// There is a destructor. Check that it's virtual..
else if (base->str() != "virtual")
{
- ErrorMessage::virtualDestructor(_errorLogger, _tokenizer, base, baseName[0], derivedClass->str());
+ _errorLogger->virtualDestructor(_tokenizer, base, baseName[0], derivedClass->str());
}
}
}
diff --git a/src/checkdangerousfunctions.cpp b/src/checkdangerousfunctions.cpp
index 4139251dd..010691ca8 100644
--- a/src/checkdangerousfunctions.cpp
+++ b/src/checkdangerousfunctions.cpp
@@ -22,7 +22,6 @@
//---------------------------------------------------------------------------
#include "checkdangerousfunctions.h"
-#include "errormessage.h"
#include
#include
diff --git a/src/checkfunctionusage.cpp b/src/checkfunctionusage.cpp
index 58edf77d8..e4318edee 100644
--- a/src/checkfunctionusage.cpp
+++ b/src/checkfunctionusage.cpp
@@ -20,7 +20,6 @@
//---------------------------------------------------------------------------
#include "checkfunctionusage.h"
-#include "errormessage.h"
#include "tokenize.h"
//---------------------------------------------------------------------------
@@ -158,7 +157,7 @@ void CheckFunctionUsage::check()
filename = "";
else
filename = func.filename;
- ErrorMessage::unusedFunction(_errorLogger, filename, it->first);
+ _errorLogger->unusedFunction(filename, it->first);
}
else if (! func.usedOtherFile)
{
diff --git a/src/checkmemoryleak.cpp b/src/checkmemoryleak.cpp
index 33fdaba98..5c7ecdadf 100644
--- a/src/checkmemoryleak.cpp
+++ b/src/checkmemoryleak.cpp
@@ -19,7 +19,6 @@
#include "checkmemoryleak.h"
-#include "errormessage.h"
#include
#include
@@ -297,11 +296,11 @@ void CheckMemoryLeakClass::MemoryLeak(const Token *tok, const char varname[], Al
{
if (alloctype == CheckMemoryLeakClass::FOPEN ||
alloctype == CheckMemoryLeakClass::POPEN)
- ErrorMessage::resourceLeak(_errorLogger, _tokenizer, tok, varname);
+ _errorLogger->resourceLeak(_tokenizer, tok, varname);
else if (all)
- ErrorMessage::memleakall(_errorLogger, _tokenizer, tok, varname);
+ _errorLogger->memleakall(_tokenizer, tok, varname);
else
- ErrorMessage::memleak(_errorLogger, _tokenizer, tok, varname);
+ _errorLogger->memleak(_tokenizer, tok, varname);
}
//---------------------------------------------------------------------------
@@ -395,7 +394,7 @@ Token *CheckMemoryLeakClass::getcode(const Token *tok, std::list
Token::Match(tok->tokAt(2), "malloc ( %num% )") &&
(std::atoi(tok->strAt(4)) % sz) != 0)
{
- ErrorMessage::mismatchSize(_errorLogger, _tokenizer, tok->tokAt(4), tok->strAt(4));
+ _errorLogger->mismatchSize(_tokenizer, tok->tokAt(4), tok->strAt(4));
}
if (alloc == No)
@@ -435,7 +434,7 @@ Token *CheckMemoryLeakClass::getcode(const Token *tok, std::list
if (alloc != Many && dealloctype != No && dealloctype != Many && dealloctype != alloc)
{
callstack.push_back(tok);
- ErrorMessage::mismatchAllocDealloc(_errorLogger, _tokenizer, callstack, varname);
+ _errorLogger->mismatchAllocDealloc(_tokenizer, callstack, varname);
callstack.pop_back();
}
@@ -482,7 +481,7 @@ Token *CheckMemoryLeakClass::getcode(const Token *tok, std::list
if (dealloc != Many && alloctype != No && alloctype != Many && alloctype != dealloc)
{
callstack.push_back(tok);
- ErrorMessage::mismatchAllocDealloc(_errorLogger, _tokenizer, callstack, varname);
+ _errorLogger->mismatchAllocDealloc(_tokenizer, callstack, varname);
callstack.pop_back();
}
dealloctype = dealloc;
@@ -1188,7 +1187,7 @@ void CheckMemoryLeakClass::CheckMemoryLeak_CheckScope(const Token *Tok1, const c
}
if ((result = Token::findmatch(tok, "dealloc [;{}] use|use_ ;")) != NULL)
{
- ErrorMessage::deallocuse(_errorLogger, _tokenizer, result->tokAt(2), varname);
+ _errorLogger->deallocuse(_tokenizer, result->tokAt(2), varname);
}
// Replace "&use" with "use". Replace "use_" with ";"
@@ -1252,7 +1251,7 @@ void CheckMemoryLeakClass::CheckMemoryLeak_CheckScope(const Token *Tok1, const c
else if ((result = Token::findmatch(tok, "dealloc ; dealloc ;")) != NULL)
{
- ErrorMessage::deallocDealloc(_errorLogger, _tokenizer, result->tokAt(2), varname);
+ _errorLogger->deallocDealloc(_tokenizer, result->tokAt(2), varname);
}
else if (! Token::findmatch(tok, "dealloc") &&
@@ -1490,7 +1489,7 @@ void CheckMemoryLeakClass::CheckMemoryLeak_ClassMembers_Variable(const std::vect
if (alloc != Many && Dealloc != No && Dealloc != Many && Dealloc != alloc)
{
callstack.push_back(tok);
- ErrorMessage::mismatchAllocDealloc(_errorLogger, _tokenizer, callstack, FullVariableName.str());
+ _errorLogger->mismatchAllocDealloc(_tokenizer, callstack, FullVariableName.str());
callstack.pop_back();
}
@@ -1517,7 +1516,7 @@ void CheckMemoryLeakClass::CheckMemoryLeak_ClassMembers_Variable(const std::vect
if (dealloc != Many && Alloc != No && Alloc != Many && Alloc != dealloc)
{
callstack.push_back(tok);
- ErrorMessage::mismatchAllocDealloc(_errorLogger, _tokenizer, callstack, FullVariableName.str());
+ _errorLogger->mismatchAllocDealloc(_tokenizer, callstack, FullVariableName.str());
callstack.pop_back();
}
diff --git a/src/checkother.cpp b/src/checkother.cpp
index 769e2ccd6..e52489e7d 100644
--- a/src/checkother.cpp
+++ b/src/checkother.cpp
@@ -20,7 +20,6 @@
//---------------------------------------------------------------------------
#include "checkother.h"
-#include "errormessage.h"
#include
#include
#include