COMP: Fix and/or disable warnings for Borland 5.6 build.
This commit is contained in:
parent
7776d18896
commit
ab61137eb1
|
@ -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",
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
%}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
|
|
@ -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"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -58,7 +58,7 @@ cmMakefileTargetGenerator::New(cmLocalUnixMakefileGenerator3 *lg,
|
|||
break;
|
||||
default:
|
||||
return result;
|
||||
break;
|
||||
// break; /* unreachable */
|
||||
}
|
||||
|
||||
result->TargetName = tgtName;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -18,6 +18,11 @@ SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
|
|||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
|
||||
|
||||
# Disable warnings on Borland to avoid changing 3rd party code.
|
||||
IF(BORLAND)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||
ENDIF(BORLAND)
|
||||
|
||||
# If we are on AIX, do the _ALL_SOURCE magic
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
|
||||
SET(_ALL_SOURCE 1)
|
||||
|
|
|
@ -6,6 +6,11 @@ INCLUDE_REGULAR_EXPRESSION("^.*$")
|
|||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
|
||||
|
||||
# Disable warnings on Borland to avoid changing 3rd party code.
|
||||
IF(BORLAND)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||
ENDIF(BORLAND)
|
||||
|
||||
# If we are on AIX, do the _ALL_SOURCE magic
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
|
||||
SET(_ALL_SOURCE 1)
|
||||
|
|
|
@ -2,6 +2,11 @@ PROJECT(XMLRPC)
|
|||
|
||||
INCLUDE_REGULAR_EXPRESSION("^.*$")
|
||||
|
||||
# Disable warnings on Borland to avoid changing 3rd party code.
|
||||
IF(BORLAND)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||
ENDIF(BORLAND)
|
||||
|
||||
# Include all the necessary files for macros
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
|
||||
|
||||
|
|
|
@ -14,6 +14,11 @@ ADD_DEFINITIONS(-DCMZLIB_IN_C)
|
|||
# Match all headers for dependencies but complain about none.
|
||||
INCLUDE_REGULAR_EXPRESSION("^.*$")
|
||||
|
||||
# Disable warnings on Borland to avoid changing 3rd party code.
|
||||
IF(BORLAND)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||
ENDIF(BORLAND)
|
||||
|
||||
# source files for zlib
|
||||
SET(ZLIB_SRCS
|
||||
adler32.c gzio.c inftrees.c uncompr.c
|
||||
|
|
Loading…
Reference in New Issue