diff --git a/cppcheck.cbproj b/cppcheck.cbproj
index 7355fbfdb..05d4a7a96 100644
--- a/cppcheck.cbproj
+++ b/cppcheck.cbproj
@@ -18,82 +18,82 @@
Base
- true
exe
- JPHNE
- NO_STRICT
+ true
true
- true
+ NO_STRICT
+ JPHNE
true
- true
+ true
true
+ true
true
- true
true
+ true
true
false
- true
- C:\cppcheck;src;cli;lib
true
- CppConsoleApplication
- true
- true
+ C:\cppcheck;src;cli;lib;externals\tinyxml
+ true
true
- .\
+ true
+ true
+ CppConsoleApplication
true
- true
+ .\
true
- true
+ true
vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;vcldbx.bpi;bdertl.bpi;A407_R110.bpi;DreamEdit_C6.bpi
- true
- true
+ true
true
- $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src;cli;lib
+ true
+ true
true
+ $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;cli;lib;externals;externals\tinyxml
true
- $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src;cli;lib
- true
+ $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src;cli;lib;externals\tinyxml
true
+ true
- false
false
- true
- _DEBUG;_HAS_ITERATOR_DEBUGGING=1;$(Defines)
+ false
true
- true
+ _DEBUG;_HAS_ITERATOR_DEBUGGING=1;$(Defines)
+ true
true
- true
+ true
true
+ true
true
- false
- true
true
+ true
+ false
true
true
None
DEBUG
- true
true
- true
+ true
true
- true
- .\
+ true
true
- true
+ .\
+ true
true
+ true
bcb_Debug
- true
- true
true
+ true
+ true
false
- true
true
+ true
true
true
true
- true
$(BDS)\lib\debug;$(ILINK_LibraryPath)
+ true
Full
true
@@ -113,49 +113,77 @@
CPlusPlusBuilder.Personality
CppConsoleApplication
-FalseFalse1000FalseFalseFalseFalseFalse105312521.0.0.01.0.0.0applicom.cFalseC:\linux-2.6.25.1\drivers\charFalseFalseTrueFalseFalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src;cli;lib$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck2$(BDS)\lib\debug;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src;cli;lib$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src;cli;lib2_DEBUG;NO_STRICT;_HAS_ITERATOR_DEBUGGING=1NO_STRICT3.\bcb_debug.12501bcb_Debug
+FalseFalse1000FalseFalseFalseFalseFalse105312521.0.0.01.0.0.0applicom.cFalseC:\linux-2.6.25.1\drivers\charFalseFalseTrueFalseFalseTrueTrue4$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;cli;lib;externals$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src;cli;lib$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck
+ 1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src;cli;lib;externals\tinyxml$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src;cli;lib1NO_STRICTNO_STRICT3.\bcb_debug.1250
+
+ 27
+
- 0
+ 28
- 1
+ 29
- 2
+ 26
+
+
+ 30
+
+
+ 31
+
+
+ 32
+
+
+ 33
lib\checkautovariables.h
- 3
+ 0
lib\checkbufferoverrun.h
- 4
+ 1
lib\checkclass.h
- 5
-
-
- lib\checkdangerousfunctions.h
- 6
+ 2
lib\checkexceptionsafety.h
- 7
+ 3
lib\checkmemoryleak.h
- 8
+ 4
+
+
+ lib\checknullpointer.h
+ 5
+
+
+ lib\checkobsoletefunctions.h
+ 6
lib\checkother.h
- 9
+ 7
+
+
+ lib\checkpostfixoperator.h
+ 8
lib\checkstl.h
+ 9
+
+
+ lib\checkuninitvar.h
10
@@ -198,13 +226,20 @@
lib\settings.h
21
+
+ lib\symboldatabase.h
+ 22
+
+
+ 23
+
lib\token.h
- 22
+ 24
lib\tokenize.h
- 23
+ 25
Cfg_1
diff --git a/cppcheck.sln b/cppcheck.sln
index aa04ccf6d..e08a5c811 100644
--- a/cppcheck.sln
+++ b/cppcheck.sln
@@ -1,8 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cppcheck", "cli\cppcheck.vcproj", "{7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cppcheck", "cli\cppcheck.vcproj", "{A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{BA98E531-D8B3-39CB-8171-064854404B81}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{E690724D-4286-3049-8439-595D1CB80EAB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -12,22 +12,22 @@ Global
Release-x64|Win32 = Release-x64|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Debug|Win32.ActiveCfg = Debug|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Debug|Win32.Build.0 = Debug|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Debug-x64|Win32.ActiveCfg = Debug-x64|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Debug-x64|Win32.Build.0 = Debug-x64|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Release|Win32.ActiveCfg = Release|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Release|Win32.Build.0 = Release|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Release-x64|Win32.ActiveCfg = Release-x64|Win32
- {7D0D241B-E144-3FAC-ABD3-8D1BBA4B600A}.Release-x64|Win32.Build.0 = Release-x64|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Debug|Win32.ActiveCfg = Debug|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Debug|Win32.Build.0 = Debug|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Debug-x64|Win32.ActiveCfg = Debug-x64|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Debug-x64|Win32.Build.0 = Debug-x64|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Release|Win32.ActiveCfg = Release|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Release|Win32.Build.0 = Release|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Release-x64|Win32.ActiveCfg = Release-x64|Win32
- {BA98E531-D8B3-39CB-8171-064854404B81}.Release-x64|Win32.Build.0 = Release-x64|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Debug|Win32.Build.0 = Debug|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Debug-x64|Win32.ActiveCfg = Debug-x64|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Debug-x64|Win32.Build.0 = Debug-x64|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Release|Win32.ActiveCfg = Release|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Release|Win32.Build.0 = Release|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Release-x64|Win32.ActiveCfg = Release-x64|Win32
+ {A610CB5D-FA83-3FC9-96AB-5689E3B50CEC}.Release-x64|Win32.Build.0 = Release-x64|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Debug|Win32.Build.0 = Debug|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Debug-x64|Win32.ActiveCfg = Debug-x64|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Debug-x64|Win32.Build.0 = Debug-x64|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Release|Win32.ActiveCfg = Release|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Release|Win32.Build.0 = Release|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Release-x64|Win32.ActiveCfg = Release-x64|Win32
+ {E690724D-4286-3049-8439-595D1CB80EAB}.Release-x64|Win32.Build.0 = Release-x64|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp
index 98d2edd72..915ec0c44 100644
--- a/lib/cppcheck.cpp
+++ b/lib/cppcheck.cpp
@@ -32,8 +32,10 @@
#include
#include "timer.h"
+#ifndef __BORLANDC__
#define PCRE_STATIC
#include
+#endif
static TimerResults S_timerResults;
@@ -301,6 +303,7 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
(*it)->runSimplifiedChecks(&_tokenizer, &_settings, this);
}
+#ifndef __BORLANDC__
// Are there extra rules?
if (!_settings.rules.empty())
{
@@ -370,6 +373,7 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
}
}
}
+#endif
}
Settings CppCheck::settings() const
diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h
index c46321e76..2743d7b11 100644
--- a/lib/symboldatabase.h
+++ b/lib/symboldatabase.h
@@ -267,6 +267,10 @@ public:
const SpaceInfo *findVarType(const SpaceInfo *start, const Token *type) const;
private:
+
+ // Needed by Borland C++:
+ friend class SpaceInfo;
+
void addFunction(SpaceInfo **info, const Token **tok, const Token *argStart);
void addNewFunction(SpaceInfo **info, const Token **tok);
diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp
index 925f1d26a..510e38d9e 100644
--- a/lib/tokenize.cpp
+++ b/lib/tokenize.cpp
@@ -6023,9 +6023,9 @@ bool Tokenizer::simplifyKnownVariables()
}
// struct name..
- const std::string structname(Token::Match(tok2->tokAt(-3), "[;{}] %var% .") ?
- (tok2->strAt(-2) + " .") :
- std::string(""));
+ const std::string structname = Token::Match(tok2->tokAt(-3), "[;{}] %var% .") ?
+ std::string(tok2->strAt(-2) + " .") :
+ std::string("");
if (tok2->str() == tok2->strAt(2))
continue;