WRN: remove warnings

This commit is contained in:
Bill Hoffman 2004-04-27 08:30:25 -04:00
parent 5a4a6a57d1
commit c19a70b3ad
2 changed files with 15 additions and 8 deletions

View File

@ -19,6 +19,8 @@
#include "cmCPluginAPI.cxx" #include "cmCPluginAPI.cxx"
#include "cmDynamicLoader.h" #include "cmDynamicLoader.h"
#include <signal.h> #include <signal.h>
extern "C" void TrapsForSignalsCFunction(int sig);
// a class for loadabple commands // a class for loadabple commands
class cmLoadedCommand : public cmCommand class cmLoadedCommand : public cmCommand
@ -103,11 +105,11 @@ public:
if(!remove) if(!remove)
{ {
signal(SIGSEGV, cmLoadedCommand::TrapsForSignals); signal(SIGSEGV, TrapsForSignalsCFunction);
#ifdef SIGBUS #ifdef SIGBUS
signal(SIGBUS, cmLoadedCommand::TrapsForSignals); signal(SIGBUS, TrapsForSignalsCFunction);
#endif #endif
signal(SIGILL, cmLoadedCommand::TrapsForSignals); signal(SIGILL, TrapsForSignalsCFunction);
} }
else else
{ {
@ -142,6 +144,12 @@ public:
cmLoadedCommandInfo info; cmLoadedCommandInfo info;
}; };
extern "C" void TrapsForSignalsCFunction(int sig)
{
cmLoadedCommand::TrapsForSignals(sig);
}
const char* cmLoadedCommand::LastName = 0; const char* cmLoadedCommand::LastName = 0;
bool cmLoadedCommand::InitialPass(std::vector<std::string> const& args) bool cmLoadedCommand::InitialPass(std::vector<std::string> const& args)

View File

@ -71,10 +71,9 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
cmSystemTools::Error(error.str().c_str()); cmSystemTools::Error(error.str().c_str());
return true; return true;
} }
cmOStringStream argcDefStream;
// now set the new argcDef argcDefStream << expandedArguments.size();
char argcDef[64]; std::string argcDef = argcDefStream.str();
sprintf(argcDef,"%i",expandedArguments.size());
// Invoke all the functions that were collected in the block. // Invoke all the functions that were collected in the block.
cmListFileFunction newLFF; cmListFileFunction newLFF;
@ -104,7 +103,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
for (unsigned int j = 1; j < m_Args.size(); ++j) for (unsigned int j = 1; j < m_Args.size(); ++j)
{ {
variable = "${ARGC}"; variable = "${ARGC}";
cmSystemTools::ReplaceString(tmps, variable.c_str(),argcDef); cmSystemTools::ReplaceString(tmps, variable.c_str(),argcDef.c_str());
} }
for (unsigned int j = 1; j < m_Args.size(); ++j) for (unsigned int j = 1; j < m_Args.size(); ++j)
{ {