Borland C++ Builder: Fixed compilation problems when compiling cppcheck
This commit is contained in:
parent
c8da301f83
commit
e9f643f04c
|
@ -18,46 +18,46 @@
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base)'!=''">
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
<BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
|
|
||||||
<OutputExt>exe</OutputExt>
|
<OutputExt>exe</OutputExt>
|
||||||
<DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
|
<BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
|
||||||
<Defines>NO_STRICT</Defines>
|
<Defines>NO_STRICT</Defines>
|
||||||
|
<DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
|
||||||
<DynamicRTL>true</DynamicRTL>
|
<DynamicRTL>true</DynamicRTL>
|
||||||
<ILINK_SelectedWarnings>false</ILINK_SelectedWarnings>
|
<ILINK_SelectedWarnings>false</ILINK_SelectedWarnings>
|
||||||
<ILINK_AllWarnings>true</ILINK_AllWarnings>
|
|
||||||
<ILINK_ObjectSearchPath>C:\cppcheck;src</ILINK_ObjectSearchPath>
|
<ILINK_ObjectSearchPath>C:\cppcheck;src</ILINK_ObjectSearchPath>
|
||||||
<ProjectType>CppConsoleApplication</ProjectType>
|
<ILINK_AllWarnings>true</ILINK_AllWarnings>
|
||||||
<NoVCL>true</NoVCL>
|
<NoVCL>true</NoVCL>
|
||||||
<FinalOutputDir>.\</FinalOutputDir>
|
<ProjectType>CppConsoleApplication</ProjectType>
|
||||||
<BCC_SelectedWarnings>false</BCC_SelectedWarnings>
|
<BCC_SelectedWarnings>false</BCC_SelectedWarnings>
|
||||||
<DCC_UNSAFE_CAST>true</DCC_UNSAFE_CAST>
|
<FinalOutputDir>.\</FinalOutputDir>
|
||||||
<PackageImports>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</PackageImports>
|
<PackageImports>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</PackageImports>
|
||||||
|
<DCC_UNSAFE_CAST>true</DCC_UNSAFE_CAST>
|
||||||
<BCC_AllWarnings>true</BCC_AllWarnings>
|
<BCC_AllWarnings>true</BCC_AllWarnings>
|
||||||
<BCC_wpar>false</BCC_wpar>
|
<BCC_wpar>false</BCC_wpar>
|
||||||
<IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src</IncludePath>
|
<IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src</IncludePath>
|
||||||
<ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src</ILINK_LibraryPath>
|
<ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src</ILINK_LibraryPath>
|
||||||
<DCC_UNSAFE_CODE>true</DCC_UNSAFE_CODE>
|
|
||||||
<DCC_UNSAFE_TYPE>true</DCC_UNSAFE_TYPE>
|
<DCC_UNSAFE_TYPE>true</DCC_UNSAFE_TYPE>
|
||||||
|
<DCC_UNSAFE_CODE>true</DCC_UNSAFE_CODE>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
<BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
|
|
||||||
<DCC_Optimize>false</DCC_Optimize>
|
<DCC_Optimize>false</DCC_Optimize>
|
||||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
<BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
|
||||||
<Defines>_DEBUG;$(Defines)</Defines>
|
<Defines>_DEBUG;$(Defines)</Defines>
|
||||||
|
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||||
<ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
|
<ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
|
||||||
<BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
|
<BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
|
||||||
<ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
|
<ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
|
||||||
<BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
|
<BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
|
||||||
<DCC_Define>DEBUG</DCC_Define>
|
<DCC_Define>DEBUG</DCC_Define>
|
||||||
<BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
|
<BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
|
||||||
<BCC_SelectedWarnings>false</BCC_SelectedWarnings>
|
|
||||||
<FinalOutputDir>.\</FinalOutputDir>
|
<FinalOutputDir>.\</FinalOutputDir>
|
||||||
|
<BCC_SelectedWarnings>false</BCC_SelectedWarnings>
|
||||||
<IntermediateOutputDir>bcb_Debug</IntermediateOutputDir>
|
<IntermediateOutputDir>bcb_Debug</IntermediateOutputDir>
|
||||||
<BCC_AllWarnings>true</BCC_AllWarnings>
|
<BCC_AllWarnings>true</BCC_AllWarnings>
|
||||||
<TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
|
<TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
|
||||||
<BCC_StackFrames>true</BCC_StackFrames>
|
<BCC_StackFrames>true</BCC_StackFrames>
|
||||||
<BCC_DisableOptimizations>true</BCC_DisableOptimizations>
|
|
||||||
<ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
<ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||||
|
<BCC_DisableOptimizations>true</BCC_DisableOptimizations>
|
||||||
<TASM_Debugging>Full</TASM_Debugging>
|
<TASM_Debugging>Full</TASM_Debugging>
|
||||||
<BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
|
<BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -77,65 +77,80 @@
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
|
<Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<CppCompile Include="src\checkautovariables.cpp">
|
||||||
|
<DependentOn>src\checkautovariables.h</DependentOn>
|
||||||
|
<BuildOrder>0</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
<CppCompile Include="src\checkbufferoverrun.cpp">
|
<CppCompile Include="src\checkbufferoverrun.cpp">
|
||||||
<DependentOn>src\checkbufferoverrun.h</DependentOn>
|
<DependentOn>src\checkbufferoverrun.h</DependentOn>
|
||||||
<BuildOrder>0</BuildOrder>
|
<BuildOrder>1</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\checkclass.cpp">
|
<CppCompile Include="src\checkclass.cpp">
|
||||||
<DependentOn>src\checkclass.h</DependentOn>
|
<DependentOn>src\checkclass.h</DependentOn>
|
||||||
<BuildOrder>1</BuildOrder>
|
<BuildOrder>2</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\checkdangerousfunctions.cpp">
|
<CppCompile Include="src\checkdangerousfunctions.cpp">
|
||||||
<DependentOn>src\checkdangerousfunctions.h</DependentOn>
|
<DependentOn>src\checkdangerousfunctions.h</DependentOn>
|
||||||
<BuildOrder>15</BuildOrder>
|
<BuildOrder>3</BuildOrder>
|
||||||
</CppCompile>
|
|
||||||
<CppCompile Include="src\checkfunctionusage.cpp">
|
|
||||||
<DependentOn>src\checkfunctionusage.h</DependentOn>
|
|
||||||
<BuildOrder>2</BuildOrder>
|
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\checkheaders.cpp">
|
<CppCompile Include="src\checkheaders.cpp">
|
||||||
<DependentOn>src\checkheaders.h</DependentOn>
|
<DependentOn>src\checkheaders.h</DependentOn>
|
||||||
<BuildOrder>3</BuildOrder>
|
<BuildOrder>4</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\checkmemoryleak.cpp">
|
<CppCompile Include="src\checkmemoryleak.cpp">
|
||||||
<DependentOn>src\checkmemoryleak.h</DependentOn>
|
<DependentOn>src\checkmemoryleak.h</DependentOn>
|
||||||
<BuildOrder>4</BuildOrder>
|
<BuildOrder>5</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\checkother.cpp">
|
<CppCompile Include="src\checkother.cpp">
|
||||||
<DependentOn>src\checkother.h</DependentOn>
|
<DependentOn>src\checkother.h</DependentOn>
|
||||||
<BuildOrder>5</BuildOrder>
|
|
||||||
</CppCompile>
|
|
||||||
<CppCompile Include="src\cppcheck.cpp">
|
|
||||||
<BuildOrder>6</BuildOrder>
|
<BuildOrder>6</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\cppcheckexecutor.cpp">
|
<CppCompile Include="src\checkstl.cpp">
|
||||||
|
<DependentOn>src\checkstl.h</DependentOn>
|
||||||
<BuildOrder>7</BuildOrder>
|
<BuildOrder>7</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\errormessage.cpp">
|
<CppCompile Include="src\checkunusedfunctions.cpp">
|
||||||
<DependentOn>src\errormessage.h</DependentOn>
|
<DependentOn>src\checkunusedfunctions.h</DependentOn>
|
||||||
<BuildOrder>8</BuildOrder>
|
<BuildOrder>8</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
|
<CppCompile Include="src\cppcheck.cpp">
|
||||||
|
<BuildOrder>9</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
|
<CppCompile Include="src\cppcheckexecutor.cpp">
|
||||||
|
<BuildOrder>10</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
|
<CppCompile Include="src\errorlogger.cpp">
|
||||||
|
<DependentOn>src\errorlogger.h</DependentOn>
|
||||||
|
<BuildOrder>11</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
<CppCompile Include="src\filelister.cpp">
|
<CppCompile Include="src\filelister.cpp">
|
||||||
<DependentOn>src\filelister.h</DependentOn>
|
<DependentOn>src\filelister.h</DependentOn>
|
||||||
<BuildOrder>9</BuildOrder>
|
<BuildOrder>12</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\main.cpp">
|
<CppCompile Include="src\main.cpp">
|
||||||
<BuildOrder>10</BuildOrder>
|
<BuildOrder>13</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
|
<CppCompile Include="src\mathlib.cpp">
|
||||||
|
<DependentOn>src\mathlib.h</DependentOn>
|
||||||
|
<BuildOrder>14</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\preprocessor.cpp">
|
<CppCompile Include="src\preprocessor.cpp">
|
||||||
<DependentOn>src\preprocessor.h</DependentOn>
|
<DependentOn>src\preprocessor.h</DependentOn>
|
||||||
<BuildOrder>11</BuildOrder>
|
<BuildOrder>15</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\settings.cpp">
|
<CppCompile Include="src\settings.cpp">
|
||||||
<BuildOrder>12</BuildOrder>
|
<BuildOrder>16</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
|
<CppCompile Include="src\threadexecutor.cpp">
|
||||||
|
<BuildOrder>17</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\token.cpp">
|
<CppCompile Include="src\token.cpp">
|
||||||
<DependentOn>src\token.h</DependentOn>
|
<DependentOn>src\token.h</DependentOn>
|
||||||
<BuildOrder>13</BuildOrder>
|
<BuildOrder>18</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<CppCompile Include="src\tokenize.cpp">
|
<CppCompile Include="src\tokenize.cpp">
|
||||||
<DependentOn>src\tokenize.h</DependentOn>
|
<DependentOn>src\tokenize.h</DependentOn>
|
||||||
<BuildOrder>14</BuildOrder>
|
<BuildOrder>19</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
<BuildConfiguration Include="Debug">
|
<BuildConfiguration Include="Debug">
|
||||||
<Key>Cfg_1</Key>
|
<Key>Cfg_1</Key>
|
||||||
|
|
|
@ -30,8 +30,12 @@
|
||||||
#endif
|
#endif
|
||||||
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#include <dir.h>
|
||||||
|
#else
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string FileLister::simplifyPath(const char *originalPath)
|
std::string FileLister::simplifyPath(const char *originalPath)
|
||||||
{
|
{
|
||||||
|
@ -198,9 +202,16 @@ static HANDLE MyFindFirstFile(std::string path, LPWIN32_FIND_DATA findData)
|
||||||
|
|
||||||
static BOOL MyIsDirectory(std::string path)
|
static BOOL MyIsDirectory(std::string path)
|
||||||
{
|
{
|
||||||
// See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx
|
#ifdef __BORLANDC__
|
||||||
BOOL res = PathIsDirectory(path.c_str());
|
struct ffblk ffblk;
|
||||||
return res;
|
int ret = findfirst(path.c_str(), &ffblk, FA_DIREC);
|
||||||
|
if (ret == 0)
|
||||||
|
findclose(&ffblk);
|
||||||
|
return !ret;
|
||||||
|
#else
|
||||||
|
// See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx
|
||||||
|
return PathIsDirectory(path.c_str());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static HANDLE MyFindFirstFile(std::string path, LPWIN32_FIND_DATA findData)
|
static HANDLE MyFindFirstFile(std::string path, LPWIN32_FIND_DATA findData)
|
||||||
|
|
Loading…
Reference in New Issue