Commit 8d7334a8 authored by Ken Martin's avatar Ken Martin
Browse files

some warning fixes

parent efe362f7
......@@ -21,7 +21,12 @@
#include "vtkTesting.h"
class vtkRegressionTester : public vtkTesting {};
class vtkRegressionTester : public vtkTesting
{
private:
vtkRegressionTester(const vtkRegressionTester&); // Not implemented.
void operator=(const vtkRegressionTester&); // Not implemented.
};
#define vtkRegressionTestImage(rw) \
vtkTesting::Test(argc, argv, rw, 10)
......
......@@ -70,9 +70,9 @@ int TestHierarchicalBox(int argc, char* argv[])
{
// Here we load the 16 separate files (each containing
// an image dataset -uniform rectilinear grid-)
ostrstream fname;
fname << "Data/chombo3d/chombo3d_" << i << ".vti" << ends;
char* fstr = fname.str();
char* fstr = new char [strlen("Data/chombo3d/chombo3d_") +
strlen(".vti") + 10];
sprintf(fstr,"Data/chombo3d/chombo3d_%i.vti",i);
char* cfname =
vtkTestUtilities::ExpandDataFileName(argc, argv, fstr);
reader->SetFileName(cfname);
......
......@@ -69,9 +69,9 @@ int TestHierarchicalBoxPipeline(int argc, char* argv[])
{
// Here we load the 16 separate files (each containing
// an image dataset -uniform rectilinear grid-)
ostrstream fname;
fname << "Data/chombo3d/chombo3d_" << i << ".vti" << ends;
char* fstr = fname.str();
char* fstr = new char [strlen("Data/chombo3d/chombo3d_") +
strlen(".vti") + 10];
sprintf(fstr,"Data/chombo3d/chombo3d_%i.vti",i);
char* cfname =
vtkTestUtilities::ExpandDataFileName(argc, argv, fstr);
reader->SetFileName(cfname);
......
......@@ -63,9 +63,9 @@ int TestMultiBlock(int argc, char* argv[])
{
// Here we load the three separate files (each containing
// a structured grid dataset)
ostrstream fname;
fname << "Data/multicomb_" << i << ".vts" << ends;
char* fstr = fname.str();
char* fstr = new char [strlen("Data/multicomb_") +
strlen(".vts") + 10];
sprintf(fstr,"Data/multicomb_%i.vts",i);
char* cfname =
vtkTestUtilities::ExpandDataFileName(argc, argv, fstr);
reader->SetFileName(cfname);
......
......@@ -25,7 +25,7 @@
#include "vtkPolyData.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkProgrammableGlyphFilter, "1.29");
vtkCxxRevisionMacro(vtkProgrammableGlyphFilter, "1.30");
vtkStandardNewMacro(vtkProgrammableGlyphFilter);
// Construct object with scaling on, scaling mode is by scalar value,
......@@ -242,14 +242,14 @@ void vtkProgrammableGlyphFilter::Execute()
if ( ptScalars )
{
int idx = outputPD->AddArray(ptScalars);
idx = outputPD->AddArray(ptScalars);
outputPD->SetActiveAttribute(idx, vtkDataSetAttributes::SCALARS);
ptScalars->Delete();
}
if ( cellScalars )
{
int idx = outputCD->AddArray(cellScalars);
idx = outputCD->AddArray(cellScalars);
outputCD->SetActiveAttribute(idx, vtkDataSetAttributes::SCALARS);
cellScalars->Delete();
}
......
......@@ -23,7 +23,7 @@
#include <sys/stat.h>
//----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkMetaImageReader, "1.4");
vtkCxxRevisionMacro(vtkMetaImageReader, "1.5");
vtkStandardNewMacro(vtkMetaImageReader);
//----------------------------------------------------------------------------
......@@ -525,7 +525,7 @@ int vtkMetaImageReader::CanReadFile(const char* fname)
}
ifstream ifs(fname);
if ( !fname )
if ( !ifs )
{
return 0;
}
......
......@@ -50,7 +50,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkGridSynchronizedTemplates3D, "1.71");
vtkCxxRevisionMacro(vtkGridSynchronizedTemplates3D, "1.72");
vtkStandardNewMacro(vtkGridSynchronizedTemplates3D);
//----------------------------------------------------------------------------
......@@ -651,7 +651,7 @@ void ContourGrid(vtkGridSynchronizedTemplates3D *self, int vtkNotUsed(threadId),
{
newScalars->SetName(inScalars->GetName());
}
int idx = output->GetPointData()->AddArray(newScalars);
idx = output->GetPointData()->AddArray(newScalars);
output->GetPointData()->SetActiveAttribute(idx, vtkDataSetAttributes::SCALARS);
newScalars->Delete();
newScalars = NULL;
......
......@@ -48,7 +48,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkRectilinearSynchronizedTemplates, "1.9");
vtkCxxRevisionMacro(vtkRectilinearSynchronizedTemplates, "1.10");
vtkStandardNewMacro(vtkRectilinearSynchronizedTemplates);
//----------------------------------------------------------------------------
......@@ -553,7 +553,7 @@ void ContourRectilinearGrid(vtkRectilinearSynchronizedTemplates *self, int *exEx
{
newScalars->SetName(inScalars->GetName());
}
int idx = output->GetPointData()->AddArray(newScalars);
idx = output->GetPointData()->AddArray(newScalars);
output->GetPointData()->SetActiveAttribute(idx, vtkDataSetAttributes::SCALARS);
newScalars->Delete();
newScalars = NULL;
......
......@@ -48,7 +48,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkSynchronizedTemplates3D, "1.77");
vtkCxxRevisionMacro(vtkSynchronizedTemplates3D, "1.78");
vtkStandardNewMacro(vtkSynchronizedTemplates3D);
//----------------------------------------------------------------------------
......@@ -555,7 +555,7 @@ void ContourImage(vtkSynchronizedTemplates3D *self, int *exExt,
{
newScalars->SetName(inScalars->GetName());
}
int idx = output->GetPointData()->AddArray(newScalars);
idx = output->GetPointData()->AddArray(newScalars);
output->GetPointData()->SetActiveAttribute(idx, vtkDataSetAttributes::SCALARS);
newScalars->Delete();
newScalars = NULL;
......
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