Commit ff2e8168 authored by bonnell's avatar bonnell

Remove unused variables from various source files.

Update projects with recent changes.
Build for MSVC 8 should be fully functional again.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@4563 18c085ea-50e0-402c-830e-de6fd14e8384
parent 34cf45fd
......@@ -95,8 +95,6 @@ avtAugDecompFileFormat::avtAugDecompFileFormat(const char *augd_filename,
CommonDatabasePluginInfo *info)
: avtMTMDFileFormat(augd_filename)
{
int i, j;
ifstream ifile(augd_filename);
ifile >> filename;
if (filename[0] != SLASH_CHAR)
......@@ -123,20 +121,20 @@ avtAugDecompFileFormat::avtAugDecompFileFormat(const char *augd_filename,
int numSubsets;
ifile >> numSubsets;
subset_names.resize(numSubsets);
for (i = 0 ; i < numSubsets ; i++)
for (int i = 0 ; i < numSubsets ; i++)
ifile >> subset_names[i];
#ifdef ENGINE
int numDomains;
ifile >> numDomains;
zone_counts.resize(numDomains);
subset_vals.resize(numDomains);
for (i = 0 ; i < numDomains ; i++)
for (int i = 0 ; i < numDomains ; i++)
{
ifile >> zone_counts[i];
subset_vals[i].resize(zone_counts[i]);
}
for (i = 0 ; i < numDomains ; i++)
for (j = 0 ; j < zone_counts[i] ; j++)
for (int i = 0 ; i < numDomains ; i++)
for (int j = 0 ; j < zone_counts[i] ; j++)
ifile >> subset_vals[i][j];
#endif
......
......@@ -879,7 +879,7 @@ void vtkCEAucdReader::ReadBinaryCellTopology(const int * ctype)
{
vtkIdType pts[8];
vtkIdType i, j, k;
unsigned int t, np, rnp;
unsigned int t, np;
int m, nmat = this->NumberOfMaterials;
int* mat = this->CellMaterialId->GetPointer(0);
int mask = (nmat>1) ? -1 : 0; // direct all cells to output 0 if not using multiple materials
......
......@@ -333,6 +333,10 @@ avtCaleFileFormat::GetPDBFile()
// Programmer: Rob Managan
// Creation: Wed Sep 19 13:30:36 PST 2007
//
// Modifications:
// Kathleen Bonnell, Tue Jul 1 16:00:00 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
......@@ -370,7 +374,7 @@ avtCaleFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
// Now walk the fpa arrays and put them all out like wsilo.
// access this list in teh dump through the fpalist structure
//
int i, nd, ne, nfpa, nipa, nnalls, namix, pdberr ;
int i, nfpa, nnalls, namix, pdberr ;
int npbin, ngrps, rdifmix ;
typedef struct {
char name[8] ;
......@@ -1281,7 +1285,7 @@ avtCaleFileFormat::GetAuxiliaryData(const char *var,
debug4 << mName << "type "<<type<<" var "<<var<<endl ;
if(strcmp(type, AUXILIARY_DATA_MATERIAL) == 0)
{
int i, kmax, lmax, lp, nnalls, namix, nvals, pdberr ;
int i, kmax, lmax, lp, nnalls, namix, pdberr ;
int nreg, nregx, nk, nl, mixmax ;
int dims[3] = {1,1,1}, ndims = 2 ;
......
......@@ -1769,8 +1769,6 @@ void vtkVisItEnSightReader::ReplaceWildcards(char* filename, int num)
{
int wildcardPos, numWildcards, numDigits = 1, i, j;
int tmpNum = num, multTen = 1;
char newChar;
int newNum;
char pattern[32];
char numStr[32];
char filenameTmp[2048];
......
......@@ -126,8 +126,7 @@ H5NIMROD_read_string_attrib (hid_t parent_id,
{
herr_t herr;
hid_t attrib_id;
hid_t type_id;
hid_t mytype, type;
hid_t mytype;
hsize_t nelem;
char *string_value;
*attrib_value = NULL;
......@@ -192,7 +191,7 @@ H5NIMROD_read_float32_array (hid_t parent_id,
hsize_t * offset,
int ndims, hsize_t * dims, float *array)
{
hid_t dataspace, dataset, memspace, datatype;
hid_t dataspace, dataset, memspace;
dataset = H5Dopen (parent_id, dataset_name);
if (dataset < 0)
{
......@@ -215,7 +214,7 @@ H5NIMROD_read_float32_array (hid_t parent_id,
dims, NULL);
}
/* datatype=H5Dget_type(dataset); */
/* hid_t datatype=H5Dget_type(dataset); */
H5Dread (dataset, /* handle for the dataset */
H5T_NATIVE_FLOAT, /* the datatype we use in memory
you can change it to FLOAT if you want */
......
......@@ -75,6 +75,10 @@ std::vector;
// Programmer: cristina -- generated by xml2avt
// Creation: Fri Feb 9 08:26:27 PDT 2007
//
// Modifications:
// Kathleen Bonnell, Wed Jul 2 08:43:22 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
......@@ -83,7 +87,7 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
// INITIALIZE DATA MEMBERS
fname = filename;
hid_t file;
hid_t root_id, group_id, vector_id;
hid_t root_id, group_id;
char *string_attrib;
float time;
file = H5Fopen (filename, H5F_ACC_RDONLY, H5P_DEFAULT);
......@@ -91,7 +95,7 @@ avtH5NimrodFileFormat::avtH5NimrodFileFormat (const char *filename):
if (file < 0)
EXCEPTION1 (InvalidFilesException, filename);
hsize_t i, j, npoints, nhexes;
hsize_t i, npoints;
// Read attributes
root_id = H5Gopen (file, "/");
......
......@@ -46,14 +46,16 @@ using namespace std;
// Programmer: cristina -- generated by xml2avt
// Creation: Mon Feb 27 13:47:07 PST 2006
//
// Modifications:
// Kathleen Bonnell, Wed Jul 2 8:49:52 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
avtH5PartFileFormat::avtH5PartFileFormat(const char *filename)
: avtMTMDFileFormat(filename)
{
// INITIALIZE DATA MEMBERS
H5PartFile *file;
fname = filename;
......@@ -63,7 +65,6 @@ avtH5PartFileFormat::avtH5PartFileFormat(const char *filename)
EXCEPTION1(InvalidFilesException, filename);
int i, j;
int npoints, npointvars;
int nspace = 3;
......@@ -83,7 +84,7 @@ avtH5PartFileFormat::avtH5PartFileFormat(const char *filename)
char name[128];
h5part_int64_t status;
for (j=0; j < npointvars; j++)
for (int j=0; j < npointvars; j++)
{
status = H5PartGetDatasetName(file,j, name,128);
if (status != H5PART_SUCCESS)
......@@ -272,6 +273,9 @@ avtH5PartFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md, int timeS
// Kurt Stockinger, Tue Aug 28 17:35:50 PDT 2007
// Added support for field data
//
// Kathleen Bonnell, Wed Jul 2 08:50:02 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
vtkDataSet *
......@@ -299,7 +303,6 @@ avtH5PartFileFormat::GetMesh(int timestate, int domain, const char *meshname)
EXCEPTION1(InvalidFilesException, fname.c_str());
long int tnpoints, npoints;
int npointvars;
int nspace = 3;
int nprocs = 1;
#ifdef PARALLEL
......@@ -519,6 +522,9 @@ avtH5PartFileFormat::GetMeshBlock(int timestate, int domain)
// Kurt Stockinger, Tue Aug 28 17:35:50 PDT 2007
// Added support for field data
//
// Kathleen Bonnell, Wed Jul 2 8:49:52 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
vtkDataArray *
......@@ -541,7 +547,6 @@ avtH5PartFileFormat::GetVar(int timestate, int domain, const char *varname)
h5part_int64_t status;
h5part_int64_t tnpoints, npoints;
int npointvars;
int nspace = 3;
int nprocs = 1;
#ifdef PARALLEL
......
......@@ -290,6 +290,10 @@ avtNek3DFileFormat::avtNek3DFileFormat(const char *filename)
// Dave Bremer, Fri Jun 6 15:38:45 PDT 2008
// Added the bParFormat flag allowing the parallel format to be used
// by a serial code, in which there is only one output dir.
//
// Kathleen Bonnell, Wed Jul 2 09:44:44 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
......@@ -298,7 +302,7 @@ avtNek3DFileFormat::ParseMetaDataFile(const char *filename)
string tag;
char buf[2048];
ifstream f(filename);
int ii, jj;
int ii;
// Verify that the 'magic' and version number are right
f >> tag;
......@@ -482,13 +486,16 @@ avtNek3DFileFormat::ParseMetaDataFile(const char *filename)
//
// Dave Bremer, Fri Jun 13 18:10:46 PDT 2008
// Small change to be more robust about finding the location of the field tags.
//
// Kathleen Bonnell, Wed Jul 2 09:44:44 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
avtNek3DFileFormat::ParseNekFileHeader()
{
string buf2, tag;
int ii, jj;
//Now read the header out of one the files to get block and variable info
char *blockfilename = new char[ fileTemplate.size() + 64 ];
......@@ -699,6 +706,10 @@ avtNek3DFileFormat::ParseNekFileHeader()
//
// Dave Bremer, Thu Jun 12 12:59:23 PDT 2008
// Support varying numbers of blocks per file in the parallel format.
//
// Kathleen Bonnell, Wed Jul 2 09:44:44 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
avtNek3DFileFormat::ReadBlockLocations()
......@@ -747,7 +758,7 @@ avtNek3DFileFormat::ReadBlockLocations()
EXCEPTION1(InvalidDBTypeException, msg);
}
int tmp1, tmp2, tmp3, tmp4, currNumBlocks;
int tmp1, tmp2, tmp3, tmp4;
f.seekg( 5, std::ios_base::beg ); //seek past the #std
f >> tmp1 >> tmp2 >> tmp3 >> tmp4 >> aBlocksPerFile[ii];
......
......@@ -278,7 +278,7 @@ MaterialEncoder::CreateMaterial(const int *dims, int ndims) const
{
int *matnos = new int[matNames.size()];
char **names = new char *[matNames.size()];
for(int i = 0; i < matNames.size(); ++i)
for(unsigned int i = 0; i < matNames.size(); ++i)
{
matnos[i] = i + 1;
names[i] = (char *)matNames[i].c_str();
......
......@@ -2532,7 +2532,7 @@ int vtkVisItPLOT3DReader::ReadNumbers( FILE *fp, unsigned int numbersToRead,
}
// convert the doubles to floats.
for (int i = 0; i< numbersToRead; i++)
for (unsigned int i = 0; i< numbersToRead; i++)
{
output[i] = (float)doubleOutput[i];
}
......
......@@ -700,6 +700,9 @@ avtS3DFileFormat::GetMesh(int timeState, int domain, const char *meshname)
// To get around WIN32 issues, call parse_dirname instead of dirname, and
// CreateStringFromDouble instead of SNPRINTF.
//
// Kathleen Bonnell, Wed Jul 2 14:44:11 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
vtkDataArray *
......@@ -721,7 +724,6 @@ avtS3DFileFormat::GetVar(int timeState, int domain, const char *varname)
char path[256];
SNPRINTF(path,256,"%s%s%s%sfield.%05d",dir.c_str(),SLASH_STRING, timestepDir.c_str(), SLASH_STRING, domain);
debug5 << "avtS3DFileFormat::GetVar: Full path to data file is " << path << endl;
int handle;
NcFile nf(path);
if (!nf.is_valid())
......
......@@ -4315,6 +4315,10 @@ avtSiloFileFormat::AddCSGMultimesh(const char *const dirname, int which_mm,
// Mark C. Miller, Thu Apr 17 10:30:54 PDT 2008
// With help from Cyrus, fixed some indexing errors between domain-local
// and group-global indexing.
//
// Kathleen Bonnell, Wed Jul 2 14:43:22 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
vtkDataArray *
......@@ -4322,7 +4326,6 @@ avtSiloFileFormat::GetNodelistsVar(int domain)
{
int i;
vtkDataArray *nlvar = 0;
int domExtents[6];
string meshName = metadata->MeshForVar("Nodelists");
const avtMeshMetaData *mmd = metadata->GetMesh(meshName);
......@@ -7367,6 +7370,9 @@ avtSiloFileFormat::DetermineFilenameAndDirectory(char *input,
// dir in the file. In this case, the location return had to be constructed
// and allocated. So, needed to add bool indicating that.
//
// Kathleen Bonnell, Wed Jul 2 14:43:22 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
......@@ -7374,7 +7380,6 @@ avtSiloFileFormat::DetermineFileAndDirectory(char *input, DBfile *&cFile,
const char *meshDirname, char *&location, bool *allocated_location)
{
char filename[1024];
char cwd[1024];
DetermineFilenameAndDirectory(input, meshDirname, filename, location,
allocated_location);
if (strcmp(filename, ".") != 0)
......
......@@ -151,15 +151,14 @@ QvisBoundaryOpWindow::CreateWindowContents()
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// Kathleen Bonnell, Tue Jul 1 15:11:27 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisBoundaryOpWindow::UpdateWindow(bool doAll)
{
QString temp;
double r;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
if(!doAll)
......@@ -170,13 +169,6 @@ QvisBoundaryOpWindow::UpdateWindow(bool doAll)
}
}
const double *dptr;
const float *fptr;
const int *iptr;
const char *cptr;
const unsigned char *uptr;
const string *sptr;
QColor tempcolor;
switch(i)
{
case BoundaryOpAttributes::ID_smoothingLevel:
......
......@@ -803,6 +803,9 @@ avtClipFilter::ModifyContract(avtContract_p spec)
// Hank Childs, Fri Feb 15 14:45:45 PST 2008
// Initialize some variables to make Klockwork happy.
//
// Kathleen Bonnell, Tue Jul 1 11:37:15 PDT 2008
// Remove unreferenced variable.
//
// ****************************************************************************
vtkRectilinearGrid *
......@@ -828,7 +831,7 @@ avtClipFilter::Clip1DRGrid(vtkImplicitBoolean *ifuncs, bool inv,
outVal->InsertNextTuple1(lastVal);
}
int i, nPts = inXC->GetNumberOfTuples();
int nPts = inXC->GetNumberOfTuples();
for (int i = 1; i < nPts; i++)
{
......
......@@ -185,15 +185,14 @@ QvisCoordSwapWindow::CreateWindowContents()
// Creation: Wed Feb 2 15:47:40 PST 2005
//
// Modifications:
//
// Kathleen Bonnell, Tue Jul 1 11:49:11 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisCoordSwapWindow::UpdateWindow(bool doAll)
{
QString temp;
double r;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
if(!doAll)
......@@ -204,13 +203,6 @@ QvisCoordSwapWindow::UpdateWindow(bool doAll)
}
}
const double *dptr;
const float *fptr;
const int *iptr;
const char *cptr;
const unsigned char *uptr;
const string *sptr;
QColor tempcolor;
switch(i)
{
case 0: //newCoord1
......@@ -237,14 +229,15 @@ QvisCoordSwapWindow::UpdateWindow(bool doAll)
// Creation: Wed Feb 2 15:47:40 PST 2005
//
// Modifications:
// Kathleen Bonnell, Tue Jul 1 11:50:05 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisCoordSwapWindow::GetCurrentValues(int which_widget)
{
bool okay, doAll = (which_widget == -1);
QString msg, temp;
bool doAll = (which_widget == -1);
// Do newCoord1
if(which_widget == 0 || doAll)
......
......@@ -209,13 +209,15 @@ QvisCracksClipperWindow::CreateWindowContents()
// Kathleen Bonnell, Mon May 7 15:48:42 PDT 2007
// Added calculateDensity, inMarVar, outDenVar.
//
// Kathleen Bonnell, Tue Jul 1 15:10:55 PDT 2008
// Removed unreferenced variable.
//
// ****************************************************************************
void
QvisCracksClipperWindow::UpdateWindow(bool doAll)
{
QString temp;
double r;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
......@@ -283,14 +285,15 @@ QvisCracksClipperWindow::UpdateWindow(bool doAll)
// Creation: Mon Aug 22 09:10:02 PDT 2005
//
// Modifications:
// Kathleen Bonnell, Tue Jul 1 15:10:55 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisCracksClipperWindow::GetCurrentValues(int which_widget)
{
bool okay, doAll = (which_widget == -1);
QString msg, temp;
bool doAll = (which_widget == -1);
// Do crack1Var
if(which_widget == 0 || doAll)
......@@ -333,7 +336,6 @@ QvisCracksClipperWindow::GetCurrentValues(int which_widget)
{
// Nothing for showCrack3
}
}
......
......@@ -415,6 +415,9 @@ avtRemoveCracksFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
// Kathleen Bonnell, Fri Oct 13 11:05:01 PDT 2006
// Reflect atts api change.
//
// Kathleen Bonnell, Tue Jul 1 15:09:54 PDT 2008
// Removed unreferenced variable.
//
// ****************************************************************************
bool
......@@ -479,7 +482,6 @@ avtRemoveCracksFilter::NeedsProcessing(vtkDataSet *ds, bool *np)
int nc = strain->GetNumberOfTuples();
int idx[3] = {0, 4, 8};
float *s = (float*)strain->GetVoidPointer(0);
float *c;
for (i = 0; i < 3; i++)
{
if (!np[i]) // this crack direction is not needed
......
......@@ -125,7 +125,8 @@ vtkCracksClipper::~vtkCracksClipper()
// Creation: Thu Oct 13 08:17:36 PDT 2005
//
// Modifications:
//
// Kathleen Bonnell, Tue Jul 1 15:08:17 PDT 2008
// Removed unreferenced variables.
// ---------------------------------------------------------------------------
void
......@@ -175,7 +176,7 @@ vtkCracksClipper::SetUpClipFunction(int cellId)
plane->SetNormal(dir);
}
double po[3], tmp1[3], tmp2[3];
double po[3];
for (int i = 0; i < 3; i++)
{
po[i] = center[i] + multiplier*crackWidth*dir[i];
......
......@@ -350,14 +350,15 @@ QvisCreateBondsWindow::UpdateWindow(bool doAll)
// Creation: August 29, 2006
//
// Modifications:
//
// Kathleen Bonnell, Tue Jul 1 11:39:22 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisCreateBondsWindow::GetCurrentValues(int which_widget)
{
bool okay, doAll = (which_widget == -1);
QString msg, temp;
bool doAll = (which_widget == -1);
// Do elementVariable
if(which_widget == 0 || doAll)
......
......@@ -160,13 +160,15 @@ QvisCylinderWindow::CreateWindowContents()
// Replaced simple QString::sprintf's with a setNum because there seems
// to be a bug causing numbers to be incremented by .00001. See '5263.
//
// Kathleen Bonnell, Tue Jul 1 11:54:17 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisCylinderWindow::UpdateWindow(bool doAll)
{
QString temp;
double r;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
......@@ -179,12 +181,6 @@ QvisCylinderWindow::UpdateWindow(bool doAll)
}
const double *dptr;
const float *fptr;
const int *iptr;
const char *cptr;
const unsigned char *uptr;
const string *sptr;
QColor tempcolor;
switch(i)
{
case 0: //point1
......
......@@ -156,14 +156,15 @@ QvisDeferExpressionWindow::CreateWindowContents()
// Creation: Tue Sep 20 13:25:13 PST 2005
//
// Modifications:
//
// Kathleen Bonnell, Tue Jul 1 11:41:00 PDT 2008
// Removed unreferenced variable.
//
// ****************************************************************************
void
QvisDeferExpressionWindow::UpdateWindow(bool doAll)
{
QString temp;
double r;
char str[1024];
for(int i = 0; i < atts->NumAttributes(); ++i)
......@@ -203,14 +204,16 @@ QvisDeferExpressionWindow::UpdateWindow(bool doAll)
// Creation: Tue Sep 20 13:25:13 PST 2005
//
// Modifications:
//
// Kathleen Bonnell, Tue Jul 1 11:42:31 PDT 2008
// Removed unreferenced variables.
//
// ****************************************************************************
void
QvisDeferExpressionWindow::GetCurrentValues(int which_widget)
{
bool okay, doAll = (which_widget == -1);
QString msg, temp;
bool