Commit a824648f authored by Dave DeMarle's avatar Dave DeMarle

Fix dashboard compilation warnings.

Change-Id: I1dbd7ce6c9a85365f65e69ef3ad1da9bf47a49db
parent 7c505858
......@@ -40,7 +40,7 @@ int TestCollection(int,char *[])
bool IsEqual(vtkCollection* collection, const std::vector<vtkSmartPointer<vtkIntArray> >& v)
{
if (collection->GetNumberOfItems() != v.size())
if (collection->GetNumberOfItems() != static_cast<int>(v.size()))
{
return false;
}
......
......@@ -123,7 +123,7 @@ double StressInvoke(const int observerCount, const int eventCount, const int inv
vtkNew<vtkTimerLog> removeTimer;
totalTimer->StartTimer();
addTimer->StartTimer();
for (int observer = 0; observer < observerCount; observer += eventCount)
for (int observerIDX = 0; observerIDX < observerCount; observerIDX += eventCount)
{
for (int event = 0; event < eventCount; ++event)
{
......
......@@ -15,7 +15,7 @@
#include "vtkDataObjectTypes.h"
class TestDataObjectTypes: public vtkDataObjectTypes
class TestDataObjectTypesTester: public vtkDataObjectTypes
{
public:
static int Test() { return vtkDataObjectTypes::Validate(); };
......@@ -23,5 +23,5 @@ public:
int TestDataObjectTypes(int vtkNotUsed(argc), char* vtkNotUsed(argv)[])
{
return TestDataObjectTypes::Test();
return TestDataObjectTypesTester::Test();
}
......@@ -336,7 +336,7 @@ void vtkOverlappingAMR::GetGlobalAMRBoxWithSpacing(
//----------------------------------------------------------------------------
void vtkOverlappingAMR::SetCompositeIndex(
const unsigned int level, const unsigned int index, const int idx )
const unsigned int level, const unsigned int index, const unsigned int idx )
{
assert( "pre: level is out-of-bounds" &&
( level < this->GetNumberOfLevels() ) );
......@@ -1013,7 +1013,7 @@ GetChildren(unsigned int level, unsigned int index)
// If there is no level map or if the level is the max level
// there is no children information
if ((this->LevelMap == NULL) ||
(this->LevelMap->GetNumberOfTuples() == (level+1)))
(this->LevelMap->GetNumberOfTuples() == static_cast<vtkIdType>(level+1)))
{
return NULL;
}
......
......@@ -138,7 +138,7 @@ public:
// Description:
// Sets the composite index of the data at the given (level,index) pair.
void SetCompositeIndex(
const unsigned int level, const unsigned int index, const int idx );
const unsigned int level, const unsigned int index, const unsigned int idx );
// Description:
// Retrieves the composite index associated with the data at the given
......
......@@ -386,7 +386,6 @@ int vtkStreamingDemandDrivenPipeline::Update(int port)
}
if(port >= -1 && port < this->Algorithm->GetNumberOfOutputPorts())
{
vtkInformation *outInfo = this->GetOutputInformation(port);
int retval = 1;
// some streaming filters can request that the pipeline execute multiple
// times for a single update
......@@ -611,7 +610,6 @@ vtkStreamingDemandDrivenPipeline
// there is output information with a data object.
vtkInformation* outInfo =
outInfoVec->GetInformationObject((outputPort >= 0)? outputPort : 0);
vtkDataObject* outData = outInfo->Get(vtkDataObject::DATA_OBJECT());
// Loop over all input ports.
for(int i=0; i < this->Algorithm->GetNumberOfInputPorts(); ++i)
......
......@@ -198,7 +198,7 @@ void vtkCMLParser::NewAtom(const char **attr)
int attrInd = 0;
unsigned short atomicNum = 0;
float pos[3];
const char * id;
const char * id = NULL;
while (const char * cur = attr[attrInd])
{
// Get atomic number
......
......@@ -155,7 +155,7 @@ int vtkMoleculeAlgorithm::RequestUpdateExtent(
// This is the superclasses style of Execute method. Convert it into
// an imaging style Execute method.
int vtkMoleculeAlgorithm::RequestData(
vtkInformation* request,
vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed( inputVector ),
vtkInformationVector* vtkNotUsed(outputVector) )
{
......
......@@ -64,9 +64,9 @@ public:
// Description:
//
vtkSetMacro(UseNativeCutter, int);
vtkGetMacro(UseNativeCutter, int);
vtkBooleanMacro(UseNativeCutter,int);
vtkSetMacro(UseNativeCutter, bool);
vtkGetMacro(UseNativeCutter, bool);
vtkBooleanMacro(UseNativeCutter, bool);
// Description:
// Set/Get a multiprocess controller for parallel processing.
......
......@@ -28,7 +28,7 @@
#include <cstdlib>
int TestExecutionTimer( int argc, char* argv[] )
int TestExecutionTimer( int vtkNotUsed(argc), char* vtkNotUsed(argv)[] )
{
vtkPoints *newPts = vtkPoints::New();
newPts->InsertNextPoint( 1.5026018771810041, 1.5026019428618222, 0.0 );
......@@ -48,7 +48,6 @@ int TestExecutionTimer( int argc, char* argv[] )
newPts->InsertNextPoint( -12.639533085855469, -12.639534341563573, 0.0 );
newPts->InsertNextPoint( 12.639533789072001, -12.639533638347073, 0.0 );
vtkIdType inNumPts = newPts->GetNumberOfPoints();
vtkPolyData *pointCloud = vtkPolyData::New();
pointCloud->SetPoints(newPts);
newPts->Delete();
......
......@@ -81,7 +81,7 @@ int vtkExtractLevel::FillOutputPortInformation(
return 1;
}
int vtkExtractLevel::RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,vtkInformationVector* )
int vtkExtractLevel::RequestUpdateExtent(vtkInformation*,vtkInformationVector** inputVector,vtkInformationVector* )
{
vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
......@@ -111,7 +111,7 @@ int vtkExtractLevel::RequestUpdateExtent(vtkInformation* request, vtkInformation
for(vtkExtractLevel::vtkSet::iterator iter =this->Levels->begin(); iter!= this->Levels->end(); ++iter )
{
unsigned int level = (*iter);
for(int dataIdx=0;dataIdx < metadata->GetNumberOfDataSets(level);++dataIdx )
for(unsigned int dataIdx=0;dataIdx < metadata->GetNumberOfDataSets(level);++dataIdx )
{
blocksToLoad.push_back(metadata->GetCompositeIndex(level,dataIdx));
}
......
......@@ -95,9 +95,12 @@ int ParticlePathFilterInternal::OutputParticles(vtkPolyData* particles)
if(path->GetNumberOfIds()>0)
{
float lastAge = outParticleAge->GetValue(path->GetId(path->GetNumberOfIds()-1));
float thisAge = outParticleAge->GetValue(outId);
assert(thisAge>=lastAge); //if not, we will have to sort
//float lastAge = outParticleAge->GetValue(path->GetId(path->GetNumberOfIds()-1));
//float thisAge = outParticleAge->GetValue(outId);
assert(outParticleAge->GetValue(outId) //thisAge
>=
outParticleAge->GetValue(path->GetId(path->GetNumberOfIds()-1))//lastAge
); //if not, we will have to sort
}
path->InsertNextId(outId);
}
......@@ -119,7 +122,7 @@ void ParticlePathFilterInternal::Finalize()
}
}
vtkParticlePathFilter::vtkParticlePathFilter():It(this)
vtkParticlePathFilter::vtkParticlePathFilter(): It(this)
{
}
......
......@@ -1029,7 +1029,7 @@ int vtkTemporalStreamTracer::RequestData(
bool result(true);
if(RequestIndex<2)
{
result = ProcessInput(inputVector);
result = (this->ProcessInput(inputVector)==1);
if(result && RequestIndex==1)
{
this->GenerateOutput(inputVector,outputVector);
......
......@@ -326,8 +326,8 @@ int vtkTemporalDataSetCache::RequestData(
{
// is the input time not already in the cache?
CacheType::iterator pos = this->Cache.find(inTime);
if (pos == this->Cache.end())
CacheType::iterator pos1 = this->Cache.find(inTime);
if (pos1 == this->Cache.end())
{
// if we have room in the Cache then just add the new data
if (this->Cache.size() < static_cast<unsigned long>(this->CacheSize))
......
......@@ -921,7 +921,7 @@ void vtkPStructuredGridConnectivity::DeserializeDataArray(
float *data = NULL;
bytestream.Pop( data, size );
assert( "pre: de-serialized data array is not of the expected size" &&
(size == (numberOfTuples*numberOfComponents) ) );
(size == static_cast<unsigned int>((numberOfTuples*numberOfComponents)) ) );
// STEP 1: Allocate vtkdata array
dataArray = vtkDataArray::CreateDataArray( dataType );
......@@ -948,7 +948,7 @@ void vtkPStructuredGridConnectivity::DeserializeDataArray(
double *data = NULL;
bytestream.Pop(data,size);
assert( "pre: de-serialized data array is not of the expected size" &&
(size==(numberOfTuples*numberOfComponents) ) );
(size == static_cast<unsigned int>((numberOfTuples*numberOfComponents)) ) );
// STEP 1: Allocate vtkdata array
dataArray = vtkDataArray::CreateDataArray( dataType );
......@@ -975,7 +975,7 @@ void vtkPStructuredGridConnectivity::DeserializeDataArray(
int *data = NULL;
bytestream.Pop(data,size);
assert( "pre: de-serialized data array is not of the expected size" &&
(size==(numberOfTuples*numberOfComponents) ) );
(size == static_cast<unsigned int>((numberOfTuples*numberOfComponents)) ) );
// STEP 1: Allocate vtkdata array
dataArray = vtkDataArray::CreateDataArray( dataType );
......
......@@ -648,31 +648,31 @@ void vtkExodusIIWriter::RemoveGhostCells()
}
//----------------------------------------------------------------------------
int vtkExodusIIWriter::CheckParametersInternal (int NumberOfProcesses, int MyRank)
{
if (!this->FileName)
{
vtkErrorMacro("No filename specified.");
return 0;
}
this->PassDoubles = this->IsDouble ();
if (this->PassDoubles < 0)
{
// Can't find float types in input, assume doubles
this->PassDoubles = 1;
}
if (this->StoreDoubles < 0)
{
// The default is to store in the
// same precision that appears in the input.
this->StoreDoubles = this->PassDoubles;
}
this->NumberOfProcesses = NumberOfProcesses;
this->MyRank = MyRank;
int vtkExodusIIWriter::CheckParametersInternal (int _NumberOfProcesses, int _MyRank)
{
if (!this->FileName)
{
vtkErrorMacro("No filename specified.");
return 0;
}
this->PassDoubles = this->IsDouble ();
if (this->PassDoubles < 0)
{
// Can't find float types in input, assume doubles
this->PassDoubles = 1;
}
if (this->StoreDoubles < 0)
{
// The default is to store in the
// same precision that appears in the input.
this->StoreDoubles = this->PassDoubles;
}
this->NumberOfProcesses = _NumberOfProcesses;
this->MyRank = _MyRank;
if (!this->CheckInputArrays ())
{
......
......@@ -297,14 +297,14 @@ void vtkGL2PSExporter::WriteData()
// What sort of special prop is it?
if (vtkActor2D *act2d = vtkActor2D::SafeDownCast(prop))
{
if (vtkTextActor *textAct = vtkTextActor::SafeDownCast(act2d))
if (vtkTextActor *atextAct = vtkTextActor::SafeDownCast(act2d))
{
this->DrawTextActor(textAct, renCol);
this->DrawTextActor(atextAct, renCol);
}
else if (vtkMathTextActor *textAct =
else if (vtkMathTextActor *atextAct2 =
vtkMathTextActor::SafeDownCast(act2d))
{
this->DrawMathTextActor(textAct, renCol);
this->DrawMathTextActor(atextAct2, renCol);
}
else if (vtkMapper2D *map2d = act2d->GetMapper())
{
......@@ -322,15 +322,15 @@ void vtkGL2PSExporter::WriteData()
continue;
}
}
else if (vtkMathTextActor3D *textAct =
else if (vtkMathTextActor3D *atextAct =
vtkMathTextActor3D::SafeDownCast(prop))
{
this->DrawMathTextActor3D(textAct, renCol);
this->DrawMathTextActor3D(atextAct, renCol);
}
else if (vtkTextActor3D *textAct =
else if (vtkTextActor3D *atextAct2 =
vtkTextActor3D::SafeDownCast(prop))
{
this->DrawTextActor3D(textAct, renCol);
this->DrawTextActor3D(atextAct2, renCol);
}
else // Some other prop
{
......@@ -372,7 +372,7 @@ void vtkGL2PSExporter::WriteData()
fclose(fpObj);
// Clean up.
for (int i = 0; i < origDepthPeeling.size(); ++i)
for (size_t i = 0; i < origDepthPeeling.size(); ++i)
{
vtkRenderer::SafeDownCast(renCol->GetItemAsObject(i))->SetUseDepthPeeling(
origDepthPeeling[i] ? 1 : 0);
......
......@@ -297,7 +297,7 @@ int vtkOggTheoraWriterInternal::EncodeFrame(th_ycbcr_buffer, int lastFrame)
ogg_packet oggPacket;
ogg_page oggPage;
int ret;
while (ret=th_encode_packetout(this->thEncContext,lastFrame,&oggPacket))
while ((ret=th_encode_packetout(this->thEncContext,lastFrame,&oggPacket)))
{
if(ret<0)
{
......@@ -391,7 +391,7 @@ void vtkOggTheoraWriterInternal::RGB2YCbCr(vtkImageData *id,
isYCPlane = true; // y-flipping
// loop over rows
size_t x, y, yC;
for (y = 0; y < this->Dim[1]; ++y)
for (y = 0; y < static_cast<size_t>(this->Dim[1]); ++y)
{
if (this->Writer->GetSubsampling())
{
......@@ -417,7 +417,7 @@ void vtkOggTheoraWriterInternal::RGB2YCbCr(vtkImageData *id,
Cr = ycbcr[2].data + yC * strideCr + this->Off[0]/2;
}
// loop over columns in row y
for (x = 0; x < this->Dim[0]; ++x)
for (x = 0; x < static_cast<size_t>(this->Dim[0]); ++x)
{
// do the actual transformation
*Y = uchar((Kr * rgb[0] + Kg * rgb[1] + Kb *rgb[2]) *ExcurY ) + OffY;
......
......@@ -261,7 +261,8 @@ void vtkIncrementalForceLayout::UpdatePositions()
float y = tPos.Y() - sPos.Y();
if (float l = (x * x + y * y))
{
l = this->Alpha * this->Strength * ((l = sqrt(l)) - this->Distance) / l;
float sqrtl = sqrt(l);
l = this->Alpha * this->Strength * (sqrtl - this->Distance) / sqrtl;
x *= l;
y *= l;
float sWeight = 1.0f;
......
......@@ -95,7 +95,6 @@ vtkObject* vtkGraphicsFactory::CreateInstance(const char* vtkclassname )
#ifdef VTK_DEBUG_LEAKS
vtkDebugLeaks::DestructClass(vtkclassname);
#endif
const char *rl = vtkGraphicsFactory::GetRenderLibrary();
return 0;
}
......
......@@ -146,7 +146,7 @@ void vtkGL2PSContextDevice2D::DrawString(float *point,
vtkGL2PSUtilities::DrawString(string.utf8_str(), this->TextProp, p);
}
void vtkGL2PSContextDevice2D::DrawMathTextString(float point[],
void vtkGL2PSContextDevice2D::DrawMathTextString(float apoint[],
const vtkStdString &string)
{
vtkNew<vtkPath> path;
......@@ -169,7 +169,7 @@ void vtkGL2PSContextDevice2D::DrawMathTextString(float point[],
return;
}
double origin[3] = {point[0], point[1], 0.f};
double origin[3] = {apoint[0], apoint[1], 0.f};
double scale[2] = {1.0, 1.0};
double rotateAngle = this->TextProp->GetOrientation();
int *renWinSize = this->RenderWindow->GetSize();
......
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