Rename variables to remove warnings
This commit is contained in:
parent
a465ee3c6b
commit
c3007233ec
@ -449,11 +449,11 @@ void cmCursesMainForm::UpdateStatusBar()
|
|||||||
|
|
||||||
// Get the key of the current entry
|
// Get the key of the current entry
|
||||||
FIELD* cur = current_field(m_Form);
|
FIELD* cur = current_field(m_Form);
|
||||||
int index = field_index(cur);
|
int findex = field_index(cur);
|
||||||
cmCursesWidget* lbl = 0;
|
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] = "";
|
char help[128] = "";
|
||||||
const char* curField = "";
|
const char* curField = "";
|
||||||
@ -550,8 +550,8 @@ void cmCursesMainForm::UpdateStatusBar()
|
|||||||
int cmCursesMainForm::Configure()
|
int cmCursesMainForm::Configure()
|
||||||
{
|
{
|
||||||
|
|
||||||
int x,y;
|
int xi,yi;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, yi, xi);
|
||||||
|
|
||||||
curses_clear();
|
curses_clear();
|
||||||
curses_move(1,1);
|
curses_move(1,1);
|
||||||
@ -589,12 +589,12 @@ int cmCursesMainForm::Configure()
|
|||||||
}
|
}
|
||||||
// reset error condition
|
// reset error condition
|
||||||
cmSystemTools::ResetErrorOccuredFlag();
|
cmSystemTools::ResetErrorOccuredFlag();
|
||||||
int x,y;
|
int xx,yy;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, yy, xx);
|
||||||
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(m_Errors,
|
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(m_Errors,
|
||||||
"Errors occurred during the last pass.");
|
"Errors occurred during the last pass.");
|
||||||
CurrentForm = msgs;
|
CurrentForm = msgs;
|
||||||
msgs->Render(1,1,x,y);
|
msgs->Render(1,1,xx,yy);
|
||||||
msgs->HandleInput();
|
msgs->HandleInput();
|
||||||
// If they typed the wrong source directory, we report
|
// If they typed the wrong source directory, we report
|
||||||
// an error and exit
|
// an error and exit
|
||||||
@ -603,19 +603,19 @@ int cmCursesMainForm::Configure()
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
CurrentForm = this;
|
CurrentForm = this;
|
||||||
this->Render(1,1,x,y);
|
this->Render(1,1,xx,yy);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->InitializeUI();
|
this->InitializeUI();
|
||||||
this->Render(1, 1, x, y);
|
this->Render(1, 1, xi, yi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmCursesMainForm::Generate()
|
int cmCursesMainForm::Generate()
|
||||||
{
|
{
|
||||||
int x,y;
|
int xi,yi;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, yi, xi);
|
||||||
|
|
||||||
curses_clear();
|
curses_clear();
|
||||||
curses_move(1,1);
|
curses_move(1,1);
|
||||||
@ -645,12 +645,12 @@ int cmCursesMainForm::Generate()
|
|||||||
}
|
}
|
||||||
// reset error condition
|
// reset error condition
|
||||||
cmSystemTools::ResetErrorOccuredFlag();
|
cmSystemTools::ResetErrorOccuredFlag();
|
||||||
int x,y;
|
int xx,yy;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, yy, xx);
|
||||||
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(m_Errors,
|
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(m_Errors,
|
||||||
"Errors occurred during the last pass.");
|
"Errors occurred during the last pass.");
|
||||||
CurrentForm = msgs;
|
CurrentForm = msgs;
|
||||||
msgs->Render(1,1,x,y);
|
msgs->Render(1,1,xx,yy);
|
||||||
msgs->HandleInput();
|
msgs->HandleInput();
|
||||||
// If they typed the wrong source directory, we report
|
// If they typed the wrong source directory, we report
|
||||||
// an error and exit
|
// an error and exit
|
||||||
@ -659,11 +659,11 @@ int cmCursesMainForm::Generate()
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
CurrentForm = this;
|
CurrentForm = this;
|
||||||
this->Render(1,1,x,y);
|
this->Render(1,1,xx,yy);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->InitializeUI();
|
this->InitializeUI();
|
||||||
this->Render(1, 1, x, y);
|
this->Render(1, 1, xi, yi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -792,12 +792,12 @@ void cmCursesMainForm::HandleInput()
|
|||||||
else if ( key == KEY_DOWN || key == ctrl('n') )
|
else if ( key == KEY_DOWN || key == ctrl('n') )
|
||||||
{
|
{
|
||||||
FIELD* cur = current_field(m_Form);
|
FIELD* cur = current_field(m_Form);
|
||||||
int index = field_index(cur);
|
int findex = field_index(cur);
|
||||||
if ( index == 3*m_NumberOfVisibleEntries-1 )
|
if ( findex == 3*m_NumberOfVisibleEntries-1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (new_page(m_Fields[index+1]))
|
if (new_page(m_Fields[findex+1]))
|
||||||
{
|
{
|
||||||
form_driver(m_Form, REQ_NEXT_PAGE);
|
form_driver(m_Form, REQ_NEXT_PAGE);
|
||||||
}
|
}
|
||||||
@ -814,15 +814,15 @@ void cmCursesMainForm::HandleInput()
|
|||||||
else if ( key == KEY_UP || key == ctrl('p') )
|
else if ( key == KEY_UP || key == ctrl('p') )
|
||||||
{
|
{
|
||||||
FIELD* cur = current_field(m_Form);
|
FIELD* cur = current_field(m_Form);
|
||||||
int index = field_index(cur);
|
int findex = field_index(cur);
|
||||||
if ( index == 2 )
|
if ( findex == 2 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( new_page(m_Fields[index-2]) )
|
if ( new_page(m_Fields[findex-2]) )
|
||||||
{
|
{
|
||||||
form_driver(m_Form, REQ_PREV_PAGE);
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -850,9 +850,9 @@ void cmCursesMainForm::HandleInput()
|
|||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, y, x);
|
||||||
|
|
||||||
FIELD* cur = current_field(m_Form);
|
FIELD* cur = current_field(m_Form);
|
||||||
int index = field_index(cur);
|
int findex = field_index(cur);
|
||||||
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(
|
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(
|
||||||
m_Fields[index-2]));
|
m_Fields[findex-2]));
|
||||||
const char* curField = lbl->GetValue();
|
const char* curField = lbl->GetValue();
|
||||||
const char* helpString=0;
|
const char* helpString=0;
|
||||||
cmCacheManager::CacheIterator it =
|
cmCacheManager::CacheIterator it =
|
||||||
@ -923,33 +923,33 @@ void cmCursesMainForm::HandleInput()
|
|||||||
{
|
{
|
||||||
m_OkToGenerate = false;
|
m_OkToGenerate = false;
|
||||||
FIELD* cur = current_field(m_Form);
|
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
|
// make the next or prev. current field after deletion
|
||||||
// each entry consists of fields: label, isnew, value
|
// each entry consists of fields: label, isnew, value
|
||||||
// therefore, the label field for the prev. entry is index-5
|
// therefore, the label field for the prev. entry is findex-5
|
||||||
// and the label field for the next entry is index+1
|
// and the label field for the next entry is findex+1
|
||||||
// (index always corresponds to the value field)
|
// (findex always corresponds to the value field)
|
||||||
FIELD* nextCur;
|
FIELD* nextCur;
|
||||||
if ( index == 2 )
|
if ( findex == 2 )
|
||||||
{
|
{
|
||||||
nextCur=0;
|
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
|
else
|
||||||
{
|
{
|
||||||
nextCur = m_Fields[index+1];
|
nextCur = m_Fields[findex+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the label widget
|
// Get the label widget
|
||||||
// each entry consists of fields: label, isnew, value
|
// each entry consists of fields: label, isnew, value
|
||||||
// therefore, the label field for the is index-2
|
// therefore, the label field for the is findex-2
|
||||||
// (index always corresponds to the value field)
|
// (findex always corresponds to the value field)
|
||||||
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(
|
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(field_userptr(
|
||||||
m_Fields[index-2]));
|
m_Fields[findex-2]));
|
||||||
this->m_CMakeInstance->GetCacheManager()->RemoveCacheEntry(lbl->GetValue());
|
this->m_CMakeInstance->GetCacheManager()->RemoveCacheEntry(lbl->GetValue());
|
||||||
|
|
||||||
std::string nextVal;
|
std::string nextVal;
|
||||||
|
@ -289,13 +289,13 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
|
|||||||
|
|
||||||
for(i = testsBegin; i != tests.end(); ++i)
|
for(i = testsBegin; i != tests.end(); ++i)
|
||||||
{
|
{
|
||||||
cmSourceFile cfile;
|
cmSourceFile icfile;
|
||||||
cfile.SetProperty("ABSTRACT","0");
|
icfile.SetProperty("ABSTRACT","0");
|
||||||
cfile.SetName(i->c_str(),
|
icfile.SetName(i->c_str(),
|
||||||
m_Makefile->GetCurrentDirectory(),
|
m_Makefile->GetCurrentDirectory(),
|
||||||
m_Makefile->GetSourceExtensions(),
|
m_Makefile->GetSourceExtensions(),
|
||||||
m_Makefile->GetHeaderExtensions());
|
m_Makefile->GetHeaderExtensions());
|
||||||
m_Makefile->AddSource(cfile);
|
m_Makefile->AddSource(icfile);
|
||||||
sourceListValue += ";";
|
sourceListValue += ";";
|
||||||
sourceListValue += *i;
|
sourceListValue += *i;
|
||||||
}
|
}
|
||||||
|
@ -109,13 +109,13 @@ cmDirectory
|
|||||||
*/
|
*/
|
||||||
const char*
|
const char*
|
||||||
cmDirectory
|
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);
|
cmSystemTools::Error("Bad index for GetFile on cmDirectory\n", 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return m_Files[index].c_str();
|
return m_Files[dindex].c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,11 +125,11 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
|
|||||||
cmSystemTools::GlobDirs(exp.c_str(), path);
|
cmSystemTools::GlobDirs(exp.c_str(), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(std::vector<std::string>::iterator i = names.begin();
|
for(std::vector<std::string>::iterator it = names.begin();
|
||||||
i != names.end() ; ++i)
|
it != names.end() ; ++it)
|
||||||
{
|
{
|
||||||
// Try to find the program.
|
// Try to find the program.
|
||||||
std::string result = cmSystemTools::FindProgram(i->c_str(),
|
std::string result = cmSystemTools::FindProgram(it->c_str(),
|
||||||
path,
|
path,
|
||||||
no_system_path);
|
no_system_path);
|
||||||
if(result != "")
|
if(result != "")
|
||||||
|
@ -71,8 +71,8 @@ void cmGlobalUnixMakefileGenerator::EnableLanguage(const char* lang,
|
|||||||
= mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
|
= mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
|
||||||
if (!versionValue || atof(versionValue) <= 1.4)
|
if (!versionValue || atof(versionValue) <= 1.4)
|
||||||
{
|
{
|
||||||
std::string fpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
|
std::string ifpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
|
||||||
mf->ReadListFile(0,fpath.c_str());
|
mf->ReadListFile(0,ifpath.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1212,12 +1212,12 @@ OutputSubDirectoryVars(std::ostream& fout,
|
|||||||
}
|
}
|
||||||
fout << "# Variable for making " << target << " in subdirectories.\n";
|
fout << "# Variable for making " << target << " in subdirectories.\n";
|
||||||
fout << var << " = \\\n";
|
fout << var << " = \\\n";
|
||||||
unsigned int i;
|
unsigned int ii;
|
||||||
for(i =0; i < SubDirectories.size(); i++)
|
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();
|
fout << target << "_" << subdir.c_str();
|
||||||
if(i == SubDirectories.size()-1)
|
if(ii == SubDirectories.size()-1)
|
||||||
{
|
{
|
||||||
fout << " \n\n";
|
fout << " \n\n";
|
||||||
}
|
}
|
||||||
@ -1228,15 +1228,15 @@ OutputSubDirectoryVars(std::ostream& fout,
|
|||||||
}
|
}
|
||||||
fout << "# Targets for making " << target << " in subdirectories.\n";
|
fout << "# Targets for making " << target << " in subdirectories.\n";
|
||||||
std::string last = "";
|
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;
|
fout << target << "_" << subdir.c_str() << ": " << depend;
|
||||||
|
|
||||||
// Make each subdirectory depend on previous one. This forces
|
// Make each subdirectory depend on previous one. This forces
|
||||||
// parallel builds (make -j 2) to build in same order as a single
|
// parallel builds (make -j 2) to build in same order as a single
|
||||||
// threaded build to avoid dependency problems.
|
// threaded build to avoid dependency problems.
|
||||||
if(i > 0)
|
if(cc > 0)
|
||||||
{
|
{
|
||||||
fout << " " << target << "_" << last.c_str();
|
fout << " " << target << "_" << last.c_str();
|
||||||
}
|
}
|
||||||
@ -1245,7 +1245,7 @@ OutputSubDirectoryVars(std::ostream& fout,
|
|||||||
last = subdir;
|
last = subdir;
|
||||||
std::string dir = m_Makefile->GetCurrentOutputDirectory();
|
std::string dir = m_Makefile->GetCurrentOutputDirectory();
|
||||||
dir += "/";
|
dir += "/";
|
||||||
dir += SubDirectories[i];
|
dir += SubDirectories[cc];
|
||||||
this->BuildInSubDirectory(fout, dir.c_str(),
|
this->BuildInSubDirectory(fout, dir.c_str(),
|
||||||
target1, target2, silent);
|
target1, target2, silent);
|
||||||
}
|
}
|
||||||
@ -1384,10 +1384,10 @@ void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
|
|||||||
}
|
}
|
||||||
fout << "\n\n";
|
fout << "\n\n";
|
||||||
fout << "# if a .h file is removed then run make dependlocal\n\n";
|
fout << "# if a .h file is removed then run make dependlocal\n\n";
|
||||||
for(std::set<std::string>::iterator i = emitted.begin();
|
for(std::set<std::string>::iterator it = emitted.begin();
|
||||||
i != emitted.end(); ++i)
|
it != emitted.end(); ++it)
|
||||||
{
|
{
|
||||||
fout << *i << ":\n"
|
fout << *it << ":\n"
|
||||||
<< "\t$(MAKE) $(MAKESILENT) dependlocal\n\n";
|
<< "\t$(MAKE) $(MAKESILENT) dependlocal\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -846,8 +846,8 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin,
|
|||||||
if(lastLine.find(inbuffer))
|
if(lastLine.find(inbuffer))
|
||||||
{
|
{
|
||||||
done = true;
|
done = true;
|
||||||
std::string args = lastLine.match(1);
|
std::string gargs = lastLine.match(1);
|
||||||
cmSystemTools::GetArguments(args, arguments);
|
cmSystemTools::GetArguments(gargs, arguments);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -109,8 +109,8 @@ CopyAndFullPathMesaHeader(const char* source,
|
|||||||
std::string includeFile = includeLine.match(1);
|
std::string includeFile = includeLine.match(1);
|
||||||
if(glDirLine.find(includeFile.c_str()))
|
if(glDirLine.find(includeFile.c_str()))
|
||||||
{
|
{
|
||||||
std::string file = glDirLine.match(3);
|
std::string gfile = glDirLine.match(3);
|
||||||
fout << "#include \"" << outdir << "/" << file.c_str() << "\"\n";
|
fout << "#include \"" << outdir << "/" << gfile.c_str() << "\"\n";
|
||||||
}
|
}
|
||||||
else if(glLine.find(includeFile.c_str()))
|
else if(glLine.find(includeFile.c_str()))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user