summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-04-27 12:30:25 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-04-27 12:30:25 (GMT)
commitc19a70b3ada66a59c7a0ff78bf1a4a1cd557db9a (patch)
treea2f31ddd5f89db1ff9474ff996081a09344179a5 /Source/cmMacroCommand.cxx
parent5a4a6a57d1949f0ce457ead1ccdd52a8a4478263 (diff)
downloadCMake-c19a70b3ada66a59c7a0ff78bf1a4a1cd557db9a.zip
CMake-c19a70b3ada66a59c7a0ff78bf1a4a1cd557db9a.tar.gz
CMake-c19a70b3ada66a59c7a0ff78bf1a4a1cd557db9a.tar.bz2
WRN: remove warnings
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r--Source/cmMacroCommand.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index a393eff..1fd8654 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -71,10 +71,9 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
cmSystemTools::Error(error.str().c_str());
return true;
}
-
- // now set the new argcDef
- char argcDef[64];
- sprintf(argcDef,"%i",expandedArguments.size());
+ cmOStringStream argcDefStream;
+ argcDefStream << expandedArguments.size();
+ std::string argcDef = argcDefStream.str();
// Invoke all the functions that were collected in the block.
cmListFileFunction newLFF;
@@ -104,7 +103,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
for (unsigned int j = 1; j < m_Args.size(); ++j)
{
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)
{