Commit 73611f7b authored by bonnell's avatar bonnell
Browse files

Remove HAVE_STRERROR, no longer used in VisIt.

Remove various unreferenced variables and other compiler warnings.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@13991 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6f1e2c18
......@@ -218,6 +218,9 @@
# Added init of opt_ARG_PREV in VISIT_OPTION_DEFAULT to avoid cmake
# warning message.
#
# Kathleen Bonnell, Mon Feb 14 11:09:17 MST 2011
# Remove strerror test, HAVE_STRERROR no longer used in VisIt.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
......@@ -1434,7 +1437,6 @@ ENDFUNCTION(CHECK_FTIME_PROTOTYPE)
# Check for some functions
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
CHECK_FUNCTION_EXISTS(div HAVE_DIV)
CHECK_FUNCTION_EXISTS(setenv HAVE_SETENV)
CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF)
......
......@@ -138,7 +138,6 @@ avtDataBinning::CreateGrid(void)
// Note the assumption here that the X-axis corresponds to tuple 0,
// the Y-axis to tuple 1, etc.
float center[3];
loc[0] = (bbox[0] + bbox[1]) / 2.;
loc[1] = (bbox[2] + bbox[3]) / 2.;
loc[2] = (bbox[4] + bbox[5]) / 2.;
......
......@@ -314,7 +314,7 @@ void
avtMTMDFileFormatInterface::SetDatabaseMetaData(avtDatabaseMetaData *md,
int timeState, bool)
{
int i, j;
int i;
GenerateTimestepCounts();
......
......@@ -838,7 +838,6 @@ avtStructuredDomainNesting::GetChildrenForLogicalIndex(int domain, int ijk[3],
domainNesting[domain].logicalExtents[5]);
}
bool inside_i, inside_j, inside_k;
int child_ext[6];
vector<int> ratios;
......@@ -1076,7 +1075,7 @@ void avtStructuredDomainNesting::ComputeChildBoundingBox(int domain)
vector<int> ratios;
int ext;
for(int i=0; i<domainNesting[domain].childDomains.size(); i++)
for(size_t i=0; i<domainNesting[domain].childDomains.size(); i++)
{
ratios = GetRatiosForLevel(domainNesting[domain].level,
domainNesting[domain].childDomains[i]);
......
......@@ -2937,7 +2937,7 @@ void
avtConnComponentsExpression::SpatialPartition::CreatePartition
(const BoundarySet &bset, double *bounds)
{
int i, j, k;
int i, j;
int t0 = visitTimer->StartTimer();
if (itree != NULL)
......
......@@ -132,7 +132,7 @@ struct IVP_API MemStream
friend std::ostream& operator<<(std::ostream &out, const MemStream &m)
{
out<<" MemStream(p= "<<m.pos()<<", l= "<<m.len()<<"["<<m.capacity()<<"]) data=[";
for (int i=0; i < m.len(); i++)
for (size_t i=0; i < m.len(); i++)
out<<(int)(m._data[i])<<" ";
out<<"]";
return out;
......
......@@ -76,7 +76,7 @@ void avtCellLocatorClassic::Free()
{
if( Tree )
{
for( int i=0; i<NumberOfOctants; i++ )
for( unsigned int i=0; i<NumberOfOctants; i++ )
{
if( Tree[i] )
Tree[i]->Delete();
......@@ -126,7 +126,7 @@ void avtCellLocatorClassic::Build()
// compute number of octants and number of divisions
int ndivs = 1, prod = 1, noct = 1;
for( int i=0; i<Level; ++i )
for( unsigned int i=0; i<Level; ++i )
{
ndivs *= 2;
prod *= 8;
......
......@@ -803,7 +803,7 @@ DiscreteMIR::ReconstructMesh(vtkDataSet *mesh_orig, avtMaterial *mat_orig, int d
ring.push_back(id(edge_begin));
}
for(int t = 0; t < ring.size(); ++t)
for(size_t t = 0; t < ring.size(); ++t)
{
ReconstructedZone zone;
zone.origzone = cellid;
......@@ -1149,7 +1149,7 @@ DiscreteMIR::ReconstructMesh(vtkDataSet *mesh_orig, avtMaterial *mat_orig, int d
#if 1
// Make each of the small tets.
for(int st = 0; st < small_tets.size(); st += 3)
for(size_t st = 0; st < small_tets.size(); st += 3)
{
// Make sure that the centroid handle exists.
if (centroid_handles[small_tets[st]] == 0)
......@@ -1176,7 +1176,7 @@ DiscreteMIR::ReconstructMesh(vtkDataSet *mesh_orig, avtMaterial *mat_orig, int d
// Maybe make the big tets if the corresponding face has a
// centroid point. If there is no centroid point, then
// we'll skip it and handle it in the next section.
for(int bt = 0; bt < big_tets.size(); bt += 3)
for(size_t bt = 0; bt < big_tets.size(); bt += 3)
{
// Skip this tet if the corresponding face's centroid
// doesn't exist.
......
......@@ -2040,7 +2040,7 @@ bool
LineIntersectsBox2D(double *bounds, double invDirX, double invDirY,
double originX, double originY, int signX, int signY)
{
double tmin, tmax, tymin, tymax, tzmin, tzmax;
double tmin, tmax, tymin, tymax;
tmin = (bounds[signX] - originX) * invDirX;
tmax = (bounds[1-signX] - originX) * invDirX;
......
......@@ -459,7 +459,7 @@ avtFloatingPointIdNamedSelection::CreateConditionString(void)
// convert all the identifiers into a string...
std::string id_string = "( id in ( "; // Prabhat- TODO id is hardcoded here..
for (int j=0; j<ids.size()-1; j++)
for (size_t j=0; j<ids.size()-1; j++)
id_string = id_string + stringify(ids[j]) + ", ";
id_string = id_string + stringify(ids[ids.size()-1]) + " ))";
......
......@@ -119,7 +119,7 @@ avtPythonFilter::GetAttribute(const string &attr_name, int &res)
long lres = PyInt_AsLong(py_obj);
Py_DECREF(py_obj);
if(lres == -1); // check for python error.
//if(lres == -1); // check for python error.
res = int(lres);
return true;
......
......@@ -297,7 +297,7 @@ ListExpr::ExtractNumericElements(vector<double> &output)
std::vector<ListElemExpr*> *elems = GetElems();
for (int i = 0 ; i < elems->size() ; i++)
for (size_t i = 0 ; i < elems->size() ; i++)
{
ExprNode *item = (*elems)[i]->GetItem();
if (item->GetTypeName() == "FloatConst")
......@@ -329,7 +329,7 @@ ListExpr::ExtractStringElements(vector<std::string> &output)
std::vector<ListElemExpr*> *elems = GetElems();
for (int i = 0 ; i < elems->size() ; i++)
for (size_t i = 0 ; i < elems->size() ; i++)
{
ExprNode *item = (*elems)[i]->GetItem();
if (item->GetTypeName() == "StringConst")
......
......@@ -1220,7 +1220,7 @@ FileOpenOptions::AddAssumedFormatsToPreferred(const stringVector &given)
{
// get its actual ID
std::string id = "";
for (int j=0; j<typeIDs.size(); j++)
for (size_t j=0; j<typeIDs.size(); j++)
{
if (given[i] == typeIDs[j] ||
given[i] == typeNames[j])
......@@ -1236,7 +1236,7 @@ FileOpenOptions::AddAssumedFormatsToPreferred(const stringVector &given)
// make a new list with this given one at the front
stringVector newPreferredIDs;
newPreferredIDs.push_back(id);
for (int j=0; j<preferredIDs.size(); j++)
for (size_t j=0; j<preferredIDs.size(); j++)
{
if (preferredIDs[j] != id)
newPreferredIDs.push_back(preferredIDs[j]);
......@@ -1264,11 +1264,11 @@ void
FileOpenOptions::AddFallbackFormatsToPreferred(const stringVector &given)
{
// for each format, append it
for (int i=0; i<given.size(); i++)
for (size_t i=0; i<given.size(); i++)
{
// get its actual ID
std::string id = "";
for (int j=0; j<typeIDs.size(); j++)
for (size_t j=0; j<typeIDs.size(); j++)
{
if (given[i] == typeIDs[j] ||
given[i] == typeNames[j])
......@@ -1283,7 +1283,7 @@ FileOpenOptions::AddFallbackFormatsToPreferred(const stringVector &given)
// make a new list with this given one at the back
stringVector newPreferredIDs;
for (int j=0; j<preferredIDs.size(); j++)
for (size_t j=0; j<preferredIDs.size(); j++)
{
if (preferredIDs[j] != id)
newPreferredIDs.push_back(preferredIDs[j]);
......
......@@ -203,7 +203,7 @@ FileOpenOptions::AddAssumedFormatsToPreferred(const stringVector &given)
{
// get its actual ID
std::string id = "";
for (int j=0; j<typeIDs.size(); j++)
for (size_t j=0; j<typeIDs.size(); j++)
{
if (given[i] == typeIDs[j] ||
given[i] == typeNames[j])
......@@ -219,7 +219,7 @@ FileOpenOptions::AddAssumedFormatsToPreferred(const stringVector &given)
// make a new list with this given one at the front
stringVector newPreferredIDs;
newPreferredIDs.push_back(id);
for (int j=0; j<preferredIDs.size(); j++)
for (size_t j=0; j<preferredIDs.size(); j++)
{
if (preferredIDs[j] != id)
newPreferredIDs.push_back(preferredIDs[j]);
......@@ -251,11 +251,11 @@ void
FileOpenOptions::AddFallbackFormatsToPreferred(const stringVector &given)
{
// for each format, append it
for (int i=0; i<given.size(); i++)
for (size_t i=0; i<given.size(); i++)
{
// get its actual ID
std::string id = "";
for (int j=0; j<typeIDs.size(); j++)
for (size_t j=0; j<typeIDs.size(); j++)
{
if (given[i] == typeIDs[j] ||
given[i] == typeNames[j])
......@@ -270,7 +270,7 @@ FileOpenOptions::AddFallbackFormatsToPreferred(const stringVector &given)
// make a new list with this given one at the back
stringVector newPreferredIDs;
for (int j=0; j<preferredIDs.size(); j++)
for (size_t j=0; j<preferredIDs.size(); j++)
{
if (preferredIDs[j] != id)
newPreferredIDs.push_back(preferredIDs[j]);
......
......@@ -3178,7 +3178,7 @@ PickAttributes::PrintSelf(ostream &os)
std::string fileName;
std::string format;
int pos = databaseName.find_last_of('/');
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
fileName = databaseName;
else
......@@ -3447,7 +3447,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
std::string fileName;
std::string format;
int pos = databaseName.find_last_of('/');
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
fileName = databaseName;
else
......@@ -3886,7 +3886,7 @@ PickAttributes::CreateConciseOutputString(std::string &os, bool withLetter)
std::string fileName;
std::string format;
int pos = databaseName.find_last_of('/');
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
fileName = databaseName;
else
......
......@@ -59,7 +59,7 @@ PickAttributes::PrintSelf(ostream &os)
std::string fileName;
std::string format;
int pos = databaseName.find_last_of('/');
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
fileName = databaseName;
else
......@@ -331,7 +331,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
std::string fileName;
std::string format;
int pos = databaseName.find_last_of('/');
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
fileName = databaseName;
else
......@@ -1007,7 +1007,7 @@ PickAttributes::CreateConciseOutputString(std::string &os, bool withLetter)
std::string fileName;
std::string format;
int pos = databaseName.find_last_of('/');
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
fileName = databaseName;
else
......
......@@ -177,7 +177,7 @@ class MRUCacheBase {
iterator find(const vector<kT>& keys)
{
iterator mpos;
for (int i = 0; i < keys.size(); i++)
for (size_t i = 0; i < keys.size(); i++)
{
mpos = find(keys[i]);
if (mpos != end())
......
......@@ -1735,7 +1735,7 @@ void vtkCEAucdReader::ClearCache()
this->CachedFileName = 0;
this->CachedFileStream = 0;
this->CachedGlobalOffset = 0;
for(int i=0;i<CachedOutputs.size();i++)
for(size_t i=0;i<CachedOutputs.size();i++)
{
if (this->CachedOutputs[i] != 0) this->CachedOutputs[i]->Delete();
}
......
......@@ -912,12 +912,12 @@ void vtkVisItExodusReader::ReadCells(int exoid, vtkUnstructuredGrid *output)
// VTK unstructured grid.
int totalSize = 0;
int numCells = 0;
for (i = 0; i < connect.size(); i++)
for (size_t j = 0; j < connect.size(); j++)
{
if(cell_num_points[i] != 0)
if(cell_num_points[j] != 0)
{
totalSize += (cell_num_points[i]+1)*(num_elem_in_block[i]);
numCells += num_elem_in_block[i];
totalSize += (cell_num_points[j]+1)*(num_elem_in_block[j]);
numCells += num_elem_in_block[j];
}
}
......@@ -968,9 +968,9 @@ void vtkVisItExodusReader::ReadCells(int exoid, vtkUnstructuredGrid *output)
}
}
for (i = 0 ; i < connect.size() ; i++)
if (connect[i] != NULL)
delete [] connect[i];
for (size_t j = 0 ; j < connect.size() ; j++)
if (connect[j] != NULL)
delete [] connect[j];
vtkCellArray *cells = vtkCellArray::New();
cells->SetCells(numCells, nlist);
......
......@@ -129,7 +129,7 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
{
// INITIALIZE DATA MEMBERS
fname = filename;
hid_t file_id, root_id, group_id, dataset_id;
hid_t file_id, root_id, group_id;
char *string_attrib;
float time;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment