Commit be20a543 authored by Sean McBride's avatar Sean McBride
Browse files

fixed harmless dead store warnings from clang static analyzer

Change-Id: Ib93a15df2834cc8c6aab0e3bd0893e56de88fb93
parent 64bc9bb9
......@@ -386,7 +386,6 @@ int vtkAppendFilter::AppendBlocksWithPointLocator
// all inputs. Note that data is common if 1) it is the same attribute
// type (scalar, vector, etc.), 2) it is the same native type (int,
// float, etc.), and 3) if a data array in a field, if it has the same name.
count = 0;
numPts = 0;
decimal = 0.0;
numCells = 0;
......
......@@ -200,7 +200,6 @@ void vtkContourImage(vtkSynchronizedTemplates2D *self,
for (vidx = 0; vidx < numContours; vidx++)
{
rowPtr = scalars;
inPtr = rowPtr;
lineCases[13] = dim0*2;
lineCases[21] = dim0*2;
......
......@@ -275,7 +275,7 @@ int vtkAreaContourSpectrumFilter::RequestData(vtkInformation* vtkNotUsed(request
// first, search for the next valid sample
int nextSample = i;
for(nextSample = i; nextSample < NumberOfSamples; nextSample++)
for(; nextSample < NumberOfSamples; nextSample++)
{
if(samples[nextSample].first) break;
}
......
......@@ -102,7 +102,6 @@ void vtkCurvatures::GetMeanCurvature(vtkPolyData *mesh)
mesh->BuildLinks();
//data init
f = 0;
F = mesh->GetNumberOfCells();
// init, preallocate the mean curvature
int* num_neighb = new int[numPts];
......
......@@ -288,7 +288,7 @@ int vtkVolumeContourSpectrumFilter::RequestData(vtkInformation* vtkNotUsed(reque
// first, search for the next valid sample
int nextSample = i;
for(nextSample = i; nextSample < NumberOfSamples; nextSample++)
for(; nextSample < NumberOfSamples; nextSample++)
{
if(samples[nextSample].first) break;
}
......
......@@ -104,7 +104,7 @@ void vtkRectilinearGridPartitioner::ExtractGridCoordinates(
// Copy coordinates from the whole grid
i=subext[0]; k=subext[4]; j=subext[2];
for( i=subext[0]; i <= subext[1]; ++i )
for( ; i <= subext[1]; ++i )
{
lidx = i-subext[0];
assert("pre: local linear index is out-of-bounds!" &&
......@@ -114,7 +114,7 @@ void vtkRectilinearGridPartitioner::ExtractGridCoordinates(
} // END for all i
i=subext[0]; k=subext[4]; j=subext[2];
for( j=subext[2]; j <= subext[3]; ++j )
for( ; j <= subext[3]; ++j )
{
lidx = j-subext[2];
assert("pre: local linear index is out-of-bounds!" &&
......
......@@ -2605,18 +2605,17 @@ void vtkFLUENTReader::GetNodesDoublePrecision()
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart+1;
double x, y, z;
if (this->GridDimension == 3)
{
for (int i = firstIndex; i <=lastIndex; i++)
{
x = this->GetCaseBufferDouble( static_cast< int >(ptr) );
double x = this->GetCaseBufferDouble( static_cast< int >(ptr) );
ptr = ptr + 8;
y = this->GetCaseBufferDouble( static_cast< int >(ptr) );
double y = this->GetCaseBufferDouble( static_cast< int >(ptr) );
ptr = ptr + 8;
z = this->GetCaseBufferDouble( static_cast< int >(ptr) );
double z = this->GetCaseBufferDouble( static_cast< int >(ptr) );
ptr = ptr + 8;
this->Points->InsertPoint(i-1, x, y, z);
}
......@@ -2625,13 +2624,12 @@ void vtkFLUENTReader::GetNodesDoublePrecision()
{
for (int i = firstIndex; i <=lastIndex; i++)
{
x = this->GetCaseBufferDouble( static_cast< int >(ptr) );
double x = this->GetCaseBufferDouble( static_cast< int >(ptr) );
ptr = ptr + 8;
y = this->GetCaseBufferDouble( static_cast< int >(ptr) );
double y = this->GetCaseBufferDouble( static_cast< int >(ptr) );
ptr = ptr + 8;
z = 0.0;
this->Points->InsertPoint(i-1, x, y, 0.0);
}
}
......
......@@ -840,7 +840,6 @@ void vtkMINCImageAttributes::SetAttributeValueAsArray(
}
n = attribs->GetNumberOfValues();
i = 0;
for (i = 0; i < n; i++)
{
if (strcmp(attribs->GetValue(i), attribute) == 0)
......
......@@ -661,11 +661,8 @@ void vtkTextActor::ComputeRectangle(vtkViewport *viewport)
double radians = vtkMath::RadiansFromDegrees( this->Orientation );
double c = cos( radians );
double s = sin( radians );
double xo, yo;
double xo = 0.0, yo = 0.0;
double x, y;
double maxWidth, maxHeight;
xo = yo = 0.0;
maxWidth = maxHeight = 0;
// When TextScaleMode is PROP, we justify text based on the rectangle
// formed by Position & Position2 coordinates
if( ( this->TextScaleMode == TEXT_SCALE_MODE_PROP ) || this->UseBorderAlign )
......@@ -677,8 +674,8 @@ void vtkTextActor::ComputeRectangle(vtkViewport *viewport)
this->PositionCoordinate->GetCoordinateSystem() );
this->SpecifiedToDisplay( position2, viewport,
this->Position2Coordinate->GetCoordinateSystem() );
maxWidth = position2[0] - position1[0];
maxHeight = position2[1] - position1[1];
double maxWidth = position2[0] - position1[0];
double maxHeight = position2[1] - position1[1];
// I could get rid of "GetAlignmentPoint" and use justification directly.
switch( this->GetAlignmentPoint() )
{
......
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