Commit ec17a5f8 authored by hkrishna's avatar hkrishna

warning fixes for visit_vtk directory

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23631 18c085ea-50e0-402c-830e-de6fd14e8384
parent 3f67761c
......@@ -253,7 +253,7 @@ vtkCSGGrid::Box::IsFlatEnough2(const double *const gridBoundaries,
// find diagonal of grad box most orthogonal to vector vg
double mindotp = DBL_MAX;
int dmxmin, dmymin;
int dmxmin = 0, dmymin = 0;
for (int d = 0; d < 4; d++)
{
int dmx = (d & 0x01) ? -1 : 1;
......@@ -286,9 +286,9 @@ vtkCSGGrid::Box::IsFlatEnough2(const double *const gridBoundaries,
double theta = acos(cos_theta);
// compute length of spatial box diagonal
double db = sqrt((upper(X)-lower(X)) * (upper(X)-lower(X)) +
(upper(Y)-lower(Y)) * (upper(Y)-lower(Y)) +
(upper(Z)-lower(Z)) * (upper(Z)-lower(Z)));
// double db = sqrt((upper(X)-lower(X)) * (upper(X)-lower(X)) +
// (upper(Y)-lower(Y)) * (upper(Y)-lower(Y)) +
// (upper(Z)-lower(Z)) * (upper(Z)-lower(Z)));
//if (((1-cos(theta/2)) / (2*sin(theta/2))) < tol)
// return true;
......@@ -1121,6 +1121,7 @@ static void PlanePPPToQuadric(const double *const plane, double *quadric)
coeffs[5] = xprod[2];
PlanePNToQuadric(coeffs, quadric);
}
#if 0
static void BoxXYZXYZToQuadric(const double *const box, double *quadric)
{
PlaneXToQuadric(&box[0], &quadric[0*NUM_QCOEFFS]);
......@@ -1130,12 +1131,13 @@ static void BoxXYZXYZToQuadric(const double *const box, double *quadric)
PlaneYToQuadric(&box[4], &quadric[4*NUM_QCOEFFS]);
PlaneZToQuadric(&box[5], &quadric[5*NUM_QCOEFFS]);
}
#endif
static void CylinderPNLRToQuadric(const double *const cyl, double *quadric)
{
// point
double px = cyl[0];
double py = cyl[1];
double pz = cyl[2];
// double px = cyl[0];
// double py = cyl[1];
// double pz = cyl[2];
// normal
double nx = cyl[3];
......@@ -1189,9 +1191,9 @@ static void CylinderPPRToQuadric(const double *const cyl, double *quadric)
static void ConePNLAToQuadric(const double *const cone, double *quadric)
{
// point
double px = cone[0];
double py = cone[1];
double pz = cone[2];
// double px = cone[0];
// double py = cone[1];
// double pz = cone[2];
// normal
double nx = cone[3];
......@@ -2401,7 +2403,7 @@ vtkCSGGrid::DoMultiPassDiscretization(int specificZone,
regionBounds = new double[10*bounds.size()];
int lastGridBound = -1;
int iRegionBounds = 0;
for (int i = 0; i < bounds.size(); i++)
for (size_t i = 0; i < bounds.size(); i++)
{
if (bounds[i] != lastGridBound)
{
......@@ -2594,12 +2596,12 @@ vtkCSGGrid::DiscretizeSpaceMultiPass(int specificZone,
GetRegionBounds(zone, bounds);
std::sort(bounds.begin(), bounds.end());
for (int i = 0; i < bounds.size(); i++)
for (size_t i = 0; i < bounds.size(); i++)
zoneMap[bounds[i]] = i;
}
// Evaluate the cell tags against this region
int ncells = rv->GetNumberOfCells();
//int ncells = rv->GetNumberOfCells();
vtkIntArray *in = vtkIntArray::New();
in->SetNumberOfComponents(1);
in->SetNumberOfTuples(rv->GetNumberOfCells());
......@@ -3132,8 +3134,9 @@ vtkCSGGrid::DiscretizeSpace3(
MakeMeshZonesByCuttingBox4(curBox, boundaryToStateMap,
boundaryToSenseMap, gridZones[specificZone],
points, ugrid, nodemap);
if (!flatNessHandledIt)
if (!flatNessHandledIt) {
debug1 << "vtkCSGGrid: Flatness passed; Cutter4 failed. Subdividing..." << endl;
}
}
if (flatNessHandledIt)
......
......@@ -140,7 +140,7 @@ int vtkLinesFromOriginalCells::RequestData(
vtkIdList *edgeNeighbors;
int numCells, cellNum, edgeNum, numEdgePts, numCellEdges;
int numPts, i, k, pt2, newId;
vtkIdType pts[2];
vtkIdType pts[2] = { 0, 0 };
int pt1 = 0, neighbor;
vtkEdgeTable *edgeTable;
vtkCell *cell, *edge;
......
......@@ -213,7 +213,7 @@ vtkMultiSplitter::RequestData(
ndx = 0;
int nx = dims[0];
int ny = dims[1];
int nz = dims[2];
//int nz = dims[2];
vtkCSGFixedLengthBitField bf_zero;
for (int k = 0; k < dims[2] - 1; k++)
{
......
......@@ -967,7 +967,7 @@ vtkOnionPeelFilter::FindCellsCorrespondingToOriginal(vtkDataSet *input,
for (int i = comp; i < n; i+=nc )
{
int id = i / nc;
if (oc[i] == orig && group->IsId(id) == -1)
if (oc[i] == (unsigned int)orig && group->IsId(id) == -1)
group->InsertNextId(id);
}
}
......
......@@ -61,9 +61,9 @@ void vtkPPMWriter::WriteFileHeader(ofstream *file, vtkImageData *cache, int wExt
int min0 = wExt[0],
max0 = wExt[1],
min1 = wExt[2],
max1 = wExt[3],
min2 = wExt[4],
max2 = wExt[5];
max1 = wExt[3]/*,
min2 = wExt[4],
max2 = wExt[5]*/;
int width, height;
width = (max0 - min0 + 1);
......
......@@ -1019,7 +1019,7 @@ vtkPolyDataOnionPeelFilter::FindCellsCorrespondingToOriginal(
for (int i = comp; i < n; i+=nc )
{
int id = i / nc;
if (oc[i] == orig && group->IsId(id) == -1)
if (oc[i] == (unsigned int)orig && group->IsId(id) == -1)
group->InsertNextId(id);
}
}
......
......@@ -215,7 +215,7 @@ vtkRectilinearLinesNoDataFilter::RequestData(
// Set up some objects that we will be using throughout the process.
//
vtkPolyData *outPD = vtkPolyData::New();
vtkCellData *inCellData = input->GetCellData();
//vtkCellData *inCellData = input->GetCellData();
vtkPointData *inPointData = input->GetPointData();
vtkCellData *outCellData = outPD->GetCellData();
vtkPointData *outPointData = outPD->GetPointData();
......
......@@ -251,7 +251,7 @@ vtkSurfaceFilter::ExecuteRectilinearGrid(vtkRectilinearGrid *rg,
outPoints->SetPoint(i, point);
}
vtkCell * aCell;
vtkCell * aCell = NULL;
for (int j = 0; j < numCells; ++j)
{
aCell = rg->GetCell(j);
......@@ -323,7 +323,7 @@ vtkSurfaceFilter::ExecutePointSet(vtkPointSet *ps, vtkUnstructuredGrid *output)
int numCells = ps->GetNumberOfCells();
int *cellTypes = new int [numCells];
vtkCellArray *cells = vtkCellArray::New();
vtkCell * aCell;
vtkCell * aCell = NULL; /// TODO: is switch handling all cases?
for (int j = 0; j < numCells; ++j)
{
switch(ps->GetDataObjectType())
......
......@@ -191,7 +191,7 @@ vtkVisItInterpolatedVelocityField::Evaluate(double *pt, double *vel, double t)
double resPt[3]={0.0,0.0,0.0};
int subId = 0;
locator->IgnoreGhostsOff();
int success = locator->FindClosestPointWithinRadius(pt, rad, resPt,
/*int success = */ locator->FindClosestPointWithinRadius(pt, rad, resPt,
cell, subId, dist);
}
......
......@@ -336,7 +336,7 @@ vtkVisItPolyDataNormals2D::ExecuteCell(vtkPolyData *input, vtkPolyData *output)
int nVerts = *connPtrL++;
vtkIdType *cell = connPtrL;
double v0[3], v1[3], v2[3];
double v0[3], v1[3]/*, v2[3]*/;
double normal[3] = {0, 0, 1};
if (nVerts == 2)
{
......
......@@ -89,7 +89,7 @@ int vtkVisItProbeFilter::RequestData(
vtkDataSet *output = vtkDataSet::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkIdType ptId, numPts, cnt = 0;
vtkIdType ptId, numPts/*, cnt = 0*/;
double x[3], tol2;
vtkCell *cell;
vtkPointData *pd, *outPD;
......
......@@ -175,7 +175,7 @@ vtkVisItStructuredGridNormals::ExecutePoint(vtkStructuredGrid *input,
for (i = 0 ; i < fastDim ; i++)
{
float normal[3] = { 0, 0, 0 };
int nQuads = 0;
//int nQuads = 0;
double anchor[3];
int idx = j*fastDim + i;
......@@ -273,7 +273,7 @@ vtkVisItStructuredGridNormals::ExecuteCell(vtkStructuredGrid *input,
// Get all the input and output objects we'll need to reference
output->ShallowCopy(input);
vtkPoints *inPts = input->GetPoints();
//vtkPoints *inPts = input->GetPoints();
int dims[3];
input->GetDimensions(dims);
......@@ -285,7 +285,7 @@ vtkVisItStructuredGridNormals::ExecuteCell(vtkStructuredGrid *input,
newNormals->SetNumberOfComponents(3);
newNormals->SetNumberOfTuples(nCells);
newNormals->SetName("Normals");
float *newNormalPtr = (float*)newNormals->GetPointer(0);
//float *newNormalPtr = (float*)newNormals->GetPointer(0);
int fastDim, slowDim;
if (dims[0] <= 1)
......
......@@ -216,7 +216,7 @@ vtkVolumeFromCSGVolume::ConstructDataSet(vtkCellData *inCD,
for (int i = 0 ; i < nshapes ; i++)
{
vector<vtkCSGFixedLengthBitField> *tagList = shapeTags[i];
for (int j = 0; j < tagList->size(); j++)
for (size_t j = 0; j < tagList->size(); j++)
{
if (tagList->operator[](j).TestBit(VTK_CSG_MAX_BITS) == false)
tags->push_back(tagList->operator[](j));
......
......@@ -62,9 +62,9 @@ vtkSkewLookupTable::vtkSkewLookupTable(int sze, int ext):
// Given a scalar value v, return an rgba color value from lookup table.
// val is first skewed accoring to the skewFactor
unsigned char *vtkSkewLookupTable::MapValue(float val)
unsigned char *vtkSkewLookupTable::MapValue(double val)
{
float temp = vtkSkewValue(val, (float)this->TableRange[0], (float)this->TableRange[1],
float temp = vtkSkewValue((float)val, (float)this->TableRange[0], (float)this->TableRange[1],
this->SkewFactor);
return this->Superclass::MapValue(temp);
}
......
......@@ -92,7 +92,7 @@ public:
// Description:
// Map one value through the lookup table.
unsigned char *MapValue(float v);
unsigned char *MapValue(double v);
// Description:
// map a set of scalars through the lookup table
......
......@@ -2674,7 +2674,7 @@ vtkUnstructuredGridBoundaryFilter::RequestData(
// This does the work of looping over all the cells and storing them in
// our hash table.
//
bool isSingleValue;
bool isSingleValue = true;
int numCopyCells = LoopOverAllCells(input, list, list2d, isSingleValue);
//
......
......@@ -1772,7 +1772,7 @@ vtkUnstructuredGridFacelistFilter::RequestData(
// This does the work of looping over all the cells and storing them in
// our hash table.
//
int numVertexCells, numLineCells, numPolygonCells, numStripCells;
int numVertexCells = 0, numLineCells = 0, numPolygonCells = 0, numStripCells = 0;
LoopOverAllCells(input, list, numVertexCells, numLineCells,
numPolygonCells, numStripCells);
......
......@@ -2176,7 +2176,7 @@ int vtkVisItCellLocator::IntersectWithLine(double a0[3], double a1[3],
int bestDir, cellIsGhost;
double stopDist, currDist;
double length, maxLength = 0.0;
double tempT, tempX[3], pc[3] = {0., 0., 0.};
double tempT, tempX[3]/*, pc[3] = {0., 0., 0.}*/;
vtkUnsignedCharArray *ghosts =
(vtkUnsignedCharArray *)this->DataSet->GetCellData()->GetArray("avtGhostZones");
......
......@@ -571,8 +571,8 @@ vtkVisItUtility::FindCell(vtkDataSet *ds, double x[3])
return -1;
}
vtkIdType ptId, cellId;
vtkCell *cell;
vtkIdType ptId = 0, cellId = 0;
vtkCell *cell = NULL;
int walk, found = -1, subId;
double pcoords[3], *weights = new double[8], diagLen, tol;
double closestPoint[3], dist2;
......
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