summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-01 11:38:42 -0400
committerBrad King <brad.king@kitware.com>2006-08-01 11:38:42 -0400
commitab61137eb177d9606ad3fa47b6b08d22b9993279 (patch)
treece57b66cd29b6dc1dab00d196eeeda84e8ef82a2 /Source
parent7776d18896bda01c743317dd45fd5c816e8f408a (diff)
downloadcmake-ab61137eb177d9606ad3fa47b6b08d22b9993279.tar.gz
COMP: Fix and/or disable warnings for Borland 5.6 build.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx3
-rw-r--r--Source/cmCommandArgumentLexer.cxx5
-rw-r--r--Source/cmCommandArgumentLexer.in.l5
-rw-r--r--Source/cmCommandArgumentParser.cxx3
-rw-r--r--Source/cmCommandArgumentParser.y6
-rw-r--r--Source/cmDependsFortranLexer.cxx5
-rw-r--r--Source/cmDependsFortranLexer.in.l5
-rw-r--r--Source/cmDependsFortranParser.cxx3
-rw-r--r--Source/cmDependsFortranParser.y3
-rw-r--r--Source/cmDependsJavaLexer.cxx5
-rw-r--r--Source/cmDependsJavaLexer.in.l5
-rw-r--r--Source/cmDependsJavaParser.cxx3
-rw-r--r--Source/cmDependsJavaParser.y3
-rw-r--r--Source/cmExprLexer.cxx5
-rw-r--r--Source/cmExprLexer.in.l5
-rw-r--r--Source/cmExprParser.cxx3
-rw-r--r--Source/cmExprParser.y3
-rw-r--r--Source/cmListFileCache.cxx4
-rw-r--r--Source/cmListFileLexer.c5
-rw-r--r--Source/cmListFileLexer.in.l5
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmSetCommand.cxx2
-rw-r--r--Source/cmStandardIncludes.h4
-rw-r--r--Source/cmTarget.cxx18
-rw-r--r--Source/cmWin32ProcessExecution.cxx12
-rw-r--r--Source/kwsys/CommandLineArguments.cxx2
-rw-r--r--Source/kwsys/SystemTools.cxx2
-rw-r--r--Source/kwsys/testProcess.c5
29 files changed, 111 insertions, 22 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 36a80cebbd..44f41f3449 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -37,6 +37,9 @@
#include <math.h>
#include <float.h>
+#if defined(__BORLANDC__)
+# pragma warn -8060 /* possibly incorrect assignment */
+#endif
static const char* cmCTestErrorMatches[] = {
"^[Bb]us [Ee]rror",
diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx
index fb382191df..1f49ad10a2 100644
--- a/Source/cmCommandArgumentLexer.cxx
+++ b/Source/cmCommandArgumentLexer.cxx
@@ -492,6 +492,11 @@ Modify cmCommandArgumentLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l
index 80afa0333f..7aa90e64ce 100644
--- a/Source/cmCommandArgumentLexer.in.l
+++ b/Source/cmCommandArgumentLexer.in.l
@@ -53,6 +53,11 @@ Modify cmCommandArgumentLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx
index 1f219dd9c0..fdfe6571ed 100644
--- a/Source/cmCommandArgumentParser.cxx
+++ b/Source/cmCommandArgumentParser.cxx
@@ -162,6 +162,9 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y
index 050d7108d2..44bd97e4f2 100644
--- a/Source/cmCommandArgumentParser.y
+++ b/Source/cmCommandArgumentParser.y
@@ -62,10 +62,14 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
-# pragma warning (disable: 4065) /* Switch statement contains default but no case. */
+# pragma warning (disable: 4065) /* Switch statement contains default but no
+ case. */
#endif
%}
diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx
index d9c370f39a..b8feb17317 100644
--- a/Source/cmDependsFortranLexer.cxx
+++ b/Source/cmDependsFortranLexer.cxx
@@ -656,6 +656,11 @@ Modify cmDependsFortranLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#define ECHO
diff --git a/Source/cmDependsFortranLexer.in.l b/Source/cmDependsFortranLexer.in.l
index a9ed2566c7..f95ccdb764 100644
--- a/Source/cmDependsFortranLexer.in.l
+++ b/Source/cmDependsFortranLexer.in.l
@@ -64,6 +64,11 @@ Modify cmDependsFortranLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#define ECHO
diff --git a/Source/cmDependsFortranParser.cxx b/Source/cmDependsFortranParser.cxx
index 2f64764814..dc69e361e8 100644
--- a/Source/cmDependsFortranParser.cxx
+++ b/Source/cmDependsFortranParser.cxx
@@ -191,6 +191,9 @@ static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y
index be04c38fd8..aec8e216fc 100644
--- a/Source/cmDependsFortranParser.y
+++ b/Source/cmDependsFortranParser.y
@@ -65,6 +65,9 @@ static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx
index bee9e241e2..aa7b571831 100644
--- a/Source/cmDependsJavaLexer.cxx
+++ b/Source/cmDependsJavaLexer.cxx
@@ -689,6 +689,11 @@ Modify cmDependsJavaLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmDependsJavaLexer.in.l b/Source/cmDependsJavaLexer.in.l
index 22879b9e13..3ca61a3998 100644
--- a/Source/cmDependsJavaLexer.in.l
+++ b/Source/cmDependsJavaLexer.in.l
@@ -53,6 +53,11 @@ Modify cmDependsJavaLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx
index 2b1690c66c..5405c05753 100644
--- a/Source/cmDependsJavaParser.cxx
+++ b/Source/cmDependsJavaParser.cxx
@@ -338,6 +338,9 @@ yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y
index def6f2d116..1d8956d087 100644
--- a/Source/cmDependsJavaParser.y
+++ b/Source/cmDependsJavaParser.y
@@ -58,6 +58,9 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx
index 093e206ee0..045cf11862 100644
--- a/Source/cmExprLexer.cxx
+++ b/Source/cmExprLexer.cxx
@@ -491,6 +491,11 @@ Modify cmExprLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l
index 7e6b6cd260..bc2ec1c4f8 100644
--- a/Source/cmExprLexer.in.l
+++ b/Source/cmExprLexer.in.l
@@ -53,6 +53,11 @@ Modify cmExprLexer.h:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#undef ECHO /* SGI termios defines this differently. */
diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx
index e973d1c4b9..6c55f22ed3 100644
--- a/Source/cmExprParser.cxx
+++ b/Source/cmExprParser.cxx
@@ -159,6 +159,9 @@ static void cmExprError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
index 27935f6593..2451abbd76 100644
--- a/Source/cmExprParser.y
+++ b/Source/cmExprParser.y
@@ -58,6 +58,9 @@ static void cmExprError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8060 /* possibly incorrect assignment */
+# pragma warn -8066 /* unreachable code */
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 9457a0c960..e1ca49c85a 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -21,6 +21,10 @@
#include <cmsys/RegularExpression.hxx>
+#ifdef __BORLANDC__
+# pragma warn -8060 /* possibly incorrect assignment */
+#endif
+
bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
cmListFileFunction& function,
const char* filename);
diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c
index 1f8797c620..8f5def65fe 100644
--- a/Source/cmListFileLexer.c
+++ b/Source/cmListFileLexer.c
@@ -530,6 +530,11 @@ Modify cmListFileLexer.c:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
#include "cmListFileLexer.h"
/*--------------------------------------------------------------------------*/
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index 02ad5208c8..00b38be2f5 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -56,6 +56,11 @@ Modify cmListFileLexer.c:
# pragma warning ( disable : 4786 )
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8008 /* condition always returns true */
+# pragma warn -8066 /* unreachable code */
+#endif
+
#include "cmListFileLexer.h"
/*--------------------------------------------------------------------------*/
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 94c9094c92..fea2bd69f7 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1158,7 +1158,7 @@ cmLocalUnixMakefileGenerator3
bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo)
{
// The info file for this target
- std::string const& infoFile = tgtInfo;
+ std::string infoFile = tgtInfo;
// Read the directory information file.
cmMakefile* mf = this->Makefile;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 335aa1294a..cadd0cb2dd 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -58,7 +58,7 @@ cmMakefileTargetGenerator::New(cmLocalUnixMakefileGenerator3 *lg,
break;
default:
return result;
- break;
+ // break; /* unreachable */
}
result->TargetName = tgtName;
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index c0bf6ceaaf..ffa2ce0ed1 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -92,7 +92,7 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
}
// collect any values into a single semi-colon seperated value list
- if(args.size() >
+ if(static_cast<unsigned short>(args.size()) >
static_cast<unsigned short>(1 + (cache ? 3 : 0) + (force ? 1 : 0)))
{
value = args[1];
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 39a605929b..2d88251a3f 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -43,6 +43,10 @@
#define CMAKE_NO_ANSI_FOR_SCOPE
#endif
+#ifdef __BORLANDC__
+#pragma warn -8030 /* Temporary used for parameter */
+#endif
+
#ifdef __ICL
#pragma warning ( disable : 985 )
#endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 26bc47d9d7..c895907808 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -915,31 +915,31 @@ const char *cmTarget::GetProperty(const char* prop)
{
case cmTarget::STATIC_LIBRARY:
return "STATIC_LIBRARY";
- break;
+ // break; /* unreachable */
case cmTarget::MODULE_LIBRARY:
return "MODULE_LIBRARY";
- break;
+ // break; /* unreachable */
case cmTarget::SHARED_LIBRARY:
return "SHARED_LIBRARY";
- break;
+ // break; /* unreachable */
case cmTarget::EXECUTABLE:
return "EXECUTABLE";
- break;
+ // break; /* unreachable */
case cmTarget::UTILITY:
return "UTILITY";
- break;
+ // break; /* unreachable */
case cmTarget::GLOBAL_TARGET:
return "GLOBAL_TARGET";
- break;
+ // break; /* unreachable */
case cmTarget::INSTALL_FILES:
return "INSTALL_FILES";
- break;
+ // break; /* unreachable */
case cmTarget::INSTALL_PROGRAMS:
return "INSTALL_PROGRAMS";
- break;
+ // break; /* unreachable */
case cmTarget::INSTALL_DIRECTORY:
return "INSTALL_DIRECTORY";
- break;
+ // break; /* unreachable */
}
return 0;
}
diff --git a/Source/cmWin32ProcessExecution.cxx b/Source/cmWin32ProcessExecution.cxx
index 88b0127fb5..ed7b1eaa53 100644
--- a/Source/cmWin32ProcessExecution.cxx
+++ b/Source/cmWin32ProcessExecution.cxx
@@ -293,14 +293,14 @@ static BOOL RealPopenCreateProcess(const char *cmdstring,
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
char *s1=0,*s2=0, *s3 = " /c ";
- int i;
- int x;
- if (i = GetEnvironmentVariable("COMSPEC",NULL,0))
+ int i = GetEnvironmentVariable("COMSPEC",NULL,0);
+ if (i)
{
char *comshell;
s1 = (char *)malloc(i);
- if (!(x = GetEnvironmentVariable("COMSPEC", s1, i)))
+ int x = GetEnvironmentVariable("COMSPEC", s1, i);
+ if (!x)
{
free(s1);
return x;
@@ -607,7 +607,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring,
case POPEN_2:
case POPEN_4:
- if ( 1 )
+ //if ( 1 )
{
fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode);
fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode);
@@ -615,7 +615,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring,
}
case POPEN_3:
- if ( 1)
+ //if ( 1)
{
fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode);
fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode);
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index 20fb3ef4ac..5a550b571e 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -216,7 +216,7 @@ int CommandLineArguments::Parse()
// additional value
CommandLineArgumentsCallbackStructure *cs
= &this->Internals->Callbacks[matches[maxidx]];
- const CommandLineArguments::Internal::String& sarg = matches[maxidx];
+ const kwsys_stl::string& sarg = matches[maxidx];
if ( cs->Argument != sarg )
{
abort();
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index c6b57c0818..bd824d37e4 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3348,7 +3348,7 @@ kwsys_stl::string SystemTools::GetCurrentDateTime(const char* format)
time_t t;
time(&t);
strftime(buf, sizeof(buf), format, localtime(&t));
- return buf;
+ return kwsys_stl::string(buf);
}
kwsys_stl::string SystemTools::MakeCindentifier(const char* s)
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c
index f87f1e0c7a..e9fc224d06 100644
--- a/Source/kwsys/testProcess.c
+++ b/Source/kwsys/testProcess.c
@@ -30,6 +30,10 @@
# include <unistd.h>
#endif
+#if defined(__BORLANDC__)
+# pragma warn -8060 /* possibly incorrect assignment */
+#endif
+
int runChild(const char* cmd[], int state, int exception, int value,
int share, int output, int delay, double timeout, int poll,
int repeat, int disown);
@@ -196,7 +200,6 @@ int test8_grandchild(int argc, const char* argv[])
return 0;
}
-
int runChild2(kwsysProcess* kp,
const char* cmd[], int state, int exception, int value,
int share, int output, int delay, double timeout,