Rename variables to remove warnings

This commit is contained in:
Andy Cedilnik 2002-10-17 10:51:23 -04:00
parent a465ee3c6b
commit c3007233ec
8 changed files with 259 additions and 259 deletions

View File

@ -449,11 +449,11 @@ void cmCursesMainForm::UpdateStatusBar()
// Get the key of the current entry
FIELD* cur = current_field(m_Form);
int index = field_index(cur);
int findex = field_index(cur);
cmCursesWidget* lbl = 0;
if ( index >= 0 )
if ( findex >= 0 )
{
lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(m_Fields[index-2]));
lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(m_Fields[findex-2]));
}
char help[128] = "";
const char* curField = "";
@ -550,8 +550,8 @@ void cmCursesMainForm::UpdateStatusBar()
int cmCursesMainForm::Configure()
{
int x,y;
getmaxyx(stdscr, y, x);
int xi,yi;
getmaxyx(stdscr, yi, xi);
curses_clear();
curses_move(1,1);
@ -589,12 +589,12 @@ int cmCursesMainForm::Configure()
}
// reset error condition
cmSystemTools::ResetErrorOccuredFlag();
int x,y;
getmaxyx(stdscr, y, x);
int xx,yy;
getmaxyx(stdscr, yy, xx);
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(m_Errors,
"Errors occurred during the last pass.");
CurrentForm = msgs;
msgs->Render(1,1,x,y);
msgs->Render(1,1,xx,yy);
msgs->HandleInput();
// If they typed the wrong source directory, we report
// an error and exit
@ -603,19 +603,19 @@ int cmCursesMainForm::Configure()
return retVal;
}
CurrentForm = this;
this->Render(1,1,x,y);
this->Render(1,1,xx,yy);
}
this->InitializeUI();
this->Render(1, 1, x, y);
this->Render(1, 1, xi, yi);
return 0;
}
int cmCursesMainForm::Generate()
{
int x,y;
getmaxyx(stdscr, y, x);
int xi,yi;
getmaxyx(stdscr, yi, xi);
curses_clear();
curses_move(1,1);
@ -645,12 +645,12 @@ int cmCursesMainForm::Generate()
}
// reset error condition
cmSystemTools::ResetErrorOccuredFlag();
int x,y;
getmaxyx(stdscr, y, x);
int xx,yy;
getmaxyx(stdscr, yy, xx);
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(m_Errors,
"Errors occurred during the last pass.");
CurrentForm = msgs;
msgs->Render(1,1,x,y);
msgs->Render(1,1,xx,yy);
msgs->HandleInput();
// If they typed the wrong source directory, we report
// an error and exit
@ -659,11 +659,11 @@ int cmCursesMainForm::Generate()
return retVal;
}
CurrentForm = this;
this->Render(1,1,x,y);
this->Render(1,1,xx,yy);
}
this->InitializeUI();
this->Render(1, 1, x, y);
this->Render(1, 1, xi, yi);
return 0;
}
@ -792,12 +792,12 @@ void cmCursesMainForm::HandleInput()
else if ( key == KEY_DOWN || key == ctrl('n') )
{
FIELD* cur = current_field(m_Form);
int index = field_index(cur);
if ( index == 3*m_NumberOfVisibleEntries-1 )
int findex = field_index(cur);
if ( findex == 3*m_NumberOfVisibleEntries-1 )
{
continue;
}
if (new_page(m_Fields[index+1]))
if (new_page(m_Fields[findex+1]))
{
form_driver(m_Form, REQ_NEXT_PAGE);
}
@ -814,15 +814,15 @@ void cmCursesMainForm::HandleInput()
else if ( key == KEY_UP || key == ctrl('p') )
{
FIELD* cur = current_field(m_Form);
int index = field_index(cur);
if ( index == 2 )
int findex = field_index(cur);
if ( findex == 2 )
{
continue;
}
if ( new_page(m_Fields[index-2]) )
if ( new_page(m_Fields[findex-2]) )
{
form_driver(m_Form, REQ_PREV_PAGE);
set_current_field(m_Form, m_Fields[index-3]);
set_current_field(m_Form, m_Fields[findex-3]);
}
else
{
@ -850,9 +850,9 @@ void cmCursesMainForm::HandleInput()
getmaxyx(stdscr, y, x);
FIELD* cur = current_field(m_Form);
int index = field_index(cur);
int findex = field_index(cur);
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(
m_Fields[index-2]));
m_Fields[findex-2]));
const char* curField = lbl->GetValue();
const char* helpString=0;
cmCacheManager::CacheIterator it =
@ -923,33 +923,33 @@ void cmCursesMainForm::HandleInput()
{
m_OkToGenerate = false;
FIELD* cur = current_field(m_Form);
int index = field_index(cur);
int findex = field_index(cur);
// make the next or prev. current field after deletion
// each entry consists of fields: label, isnew, value
// therefore, the label field for the prev. entry is index-5
// and the label field for the next entry is index+1
// (index always corresponds to the value field)
// therefore, the label field for the prev. entry is findex-5
// and the label field for the next entry is findex+1
// (findex always corresponds to the value field)
FIELD* nextCur;
if ( index == 2 )
if ( findex == 2 )
{
nextCur=0;
}
else if ( index == 3*m_NumberOfVisibleEntries-1 )
else if ( findex == 3*m_NumberOfVisibleEntries-1 )
{
nextCur = m_Fields[index-5];
nextCur = m_Fields[findex-5];
}
else
{
nextCur = m_Fields[index+1];
nextCur = m_Fields[findex+1];
}
// Get the label widget
// each entry consists of fields: label, isnew, value
// therefore, the label field for the is index-2
// (index always corresponds to the value field)
// therefore, the label field for the is findex-2
// (findex always corresponds to the value field)
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(
m_Fields[index-2]));
m_Fields[findex-2]));
this->m_CMakeInstance->GetCacheManager()->RemoveCacheEntry(lbl->GetValue());
std::string nextVal;

View File

@ -289,13 +289,13 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
for(i = testsBegin; i != tests.end(); ++i)
{
cmSourceFile cfile;
cfile.SetProperty("ABSTRACT","0");
cfile.SetName(i->c_str(),
cmSourceFile icfile;
icfile.SetProperty("ABSTRACT","0");
icfile.SetName(i->c_str(),
m_Makefile->GetCurrentDirectory(),
m_Makefile->GetSourceExtensions(),
m_Makefile->GetHeaderExtensions());
m_Makefile->AddSource(cfile);
m_Makefile->AddSource(icfile);
sourceListValue += ";";
sourceListValue += *i;
}

View File

@ -109,13 +109,13 @@ cmDirectory
*/
const char*
cmDirectory
::GetFile(size_t index)
::GetFile(size_t dindex)
{
if ( index >= m_Files.size() )
if ( dindex >= m_Files.size() )
{
cmSystemTools::Error("Bad index for GetFile on cmDirectory\n", 0);
return 0;
}
return m_Files[index].c_str();
return m_Files[dindex].c_str();
}

View File

@ -125,11 +125,11 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
cmSystemTools::GlobDirs(exp.c_str(), path);
}
}
for(std::vector<std::string>::iterator i = names.begin();
i != names.end() ; ++i)
for(std::vector<std::string>::iterator it = names.begin();
it != names.end() ; ++it)
{
// Try to find the program.
std::string result = cmSystemTools::FindProgram(i->c_str(),
std::string result = cmSystemTools::FindProgram(it->c_str(),
path,
no_system_path);
if(result != "")

View File

@ -71,8 +71,8 @@ void cmGlobalUnixMakefileGenerator::EnableLanguage(const char* lang,
= mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
if (!versionValue || atof(versionValue) <= 1.4)
{
std::string fpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
mf->ReadListFile(0,fpath.c_str());
std::string ifpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
mf->ReadListFile(0,ifpath.c_str());
}
}
}

View File

@ -1212,12 +1212,12 @@ OutputSubDirectoryVars(std::ostream& fout,
}
fout << "# Variable for making " << target << " in subdirectories.\n";
fout << var << " = \\\n";
unsigned int i;
for(i =0; i < SubDirectories.size(); i++)
unsigned int ii;
for(ii =0; ii < SubDirectories.size(); ii++)
{
std::string subdir = FixDirectoryName(SubDirectories[i].c_str());
std::string subdir = FixDirectoryName(SubDirectories[ii].c_str());
fout << target << "_" << subdir.c_str();
if(i == SubDirectories.size()-1)
if(ii == SubDirectories.size()-1)
{
fout << " \n\n";
}
@ -1228,15 +1228,15 @@ OutputSubDirectoryVars(std::ostream& fout,
}
fout << "# Targets for making " << target << " in subdirectories.\n";
std::string last = "";
for(unsigned int i =0; i < SubDirectories.size(); i++)
for(unsigned int cc =0; cc < SubDirectories.size(); cc++)
{
std::string subdir = FixDirectoryName(SubDirectories[i].c_str());
std::string subdir = FixDirectoryName(SubDirectories[cc].c_str());
fout << target << "_" << subdir.c_str() << ": " << depend;
// Make each subdirectory depend on previous one. This forces
// parallel builds (make -j 2) to build in same order as a single
// threaded build to avoid dependency problems.
if(i > 0)
if(cc > 0)
{
fout << " " << target << "_" << last.c_str();
}
@ -1245,7 +1245,7 @@ OutputSubDirectoryVars(std::ostream& fout,
last = subdir;
std::string dir = m_Makefile->GetCurrentOutputDirectory();
dir += "/";
dir += SubDirectories[i];
dir += SubDirectories[cc];
this->BuildInSubDirectory(fout, dir.c_str(),
target1, target2, silent);
}
@ -1384,10 +1384,10 @@ void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
}
fout << "\n\n";
fout << "# if a .h file is removed then run make dependlocal\n\n";
for(std::set<std::string>::iterator i = emitted.begin();
i != emitted.end(); ++i)
for(std::set<std::string>::iterator it = emitted.begin();
it != emitted.end(); ++it)
{
fout << *i << ":\n"
fout << *it << ":\n"
<< "\t$(MAKE) $(MAKESILENT) dependlocal\n\n";
}
}

View File

@ -846,8 +846,8 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin,
if(lastLine.find(inbuffer))
{
done = true;
std::string args = lastLine.match(1);
cmSystemTools::GetArguments(args, arguments);
std::string gargs = lastLine.match(1);
cmSystemTools::GetArguments(gargs, arguments);
}
else
{

View File

@ -109,8 +109,8 @@ CopyAndFullPathMesaHeader(const char* source,
std::string includeFile = includeLine.match(1);
if(glDirLine.find(includeFile.c_str()))
{
std::string file = glDirLine.match(3);
fout << "#include \"" << outdir << "/" << file.c_str() << "\"\n";
std::string gfile = glDirLine.match(3);
fout << "#include \"" << outdir << "/" << gfile.c_str() << "\"\n";
}
else if(glLine.find(includeFile.c_str()))
{