Commit 5c851441 authored by Bill Lorensen's avatar Bill Lorensen
Browse files

COMP: Uninitialized memory reads

Running the otherPrint test with valgrind uncovered several
uninitialized memory read defects

Change-Id: I31779489cca5aef2b250f6793254fa61c387aa7a
parent 42cea1fc
......@@ -37,7 +37,6 @@ const char * @vtk-module@ObjectFactory::GetVTKSourceVersion()
void @vtk-module@ObjectFactory::PrintSelf(ostream &os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "Description: " << this->GetDescription() << endl;
}
// Registration of object factories.
......
......@@ -381,10 +381,19 @@ void vtkObjectFactory::RegisterFactory(vtkObjectFactory* factory)
void vtkObjectFactory::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent
<< "Factory DLL path: " << this->LibraryPath << "\n";
os << indent << "Library version: " << this->LibraryVTKVersion << "\n";
os << indent << "Compiler used: " << this->LibraryCompilerUsed << "\n";
if (this->LibraryPath)
{
os << indent
<< "Factory DLL path: " << this->LibraryPath << "\n";
}
if (this->LibraryVTKVersion)
{
os << indent << "Library version: " << this->LibraryVTKVersion << "\n";
}
if (this->LibraryCompilerUsed)
{
os << indent << "Compiler used: " << this->LibraryCompilerUsed << "\n";
}
os << indent << "Factory description: " << this->GetDescription() << endl;
int num = this->GetNumberOfOverrides();
os << indent << "Factory overides " << num << " classes:" << endl;
......
......@@ -30,7 +30,7 @@ vtkStandardNewMacro(vtkCenterOfMass);
vtkCenterOfMass::vtkCenterOfMass()
{
this->UseScalarsAsWeights = false;
this->Center[0] = this->Center[1] = this->Center[2] = 0.0;
this->SetNumberOfOutputPorts(0);
}
......
......@@ -55,6 +55,7 @@ vtkStructuredAMRGridConnectivity::vtkStructuredAMRGridConnectivity()
this->DataDescription = VTK_EMPTY;
this->NumberOfGrids = 0;
this->MaxLevel = -1;
this->RefinementRatio = -1;
this->NumberOfLevels = 0;
this->BalancedRefinement = true;
this->CellCentered = true;
......
......@@ -42,6 +42,7 @@ vtkHyperTreeGridSource::vtkHyperTreeGridSource()
// Grid parameters
this->BranchFactor = 2;
this->MaximumLevel = 1;
this->BlockSize = 0;
// Grid topology
this->Dimension = 3;
......
......@@ -682,6 +682,11 @@ void vtkMPASReader::SetDefaults() {
this->PointVarDataArray = NULL;
this->PointVarData = NULL;
this->TimeSteps = NULL;
this->NumberOfPointVars = 0;
this->NumberOfCellVars = 0;
this->MaximumPoints = 0;
this->MaximumCells = 0;
}
//----------------------------------------------------------------------------
......
......@@ -37,6 +37,10 @@ vtkInteractorStyleRubberBand2D::vtkInteractorStyleRubberBand2D()
this->PixelArray = vtkUnsignedCharArray::New();
this->Interaction = NONE;
this->RenderOnMouseMove = false;
this->StartPosition[0] = 0.0;
this->StartPosition[1] = 0.0;
this->EndPosition[0] = 0.0;
this->EndPosition[1] = 0.0;
}
//--------------------------------------------------------------------------
......
......@@ -37,6 +37,10 @@ vtkInteractorStyleRubberBand3D::vtkInteractorStyleRubberBand3D()
this->PixelArray = vtkUnsignedCharArray::New();
this->Interaction = NONE;
this->RenderOnMouseMove = false;
this->StartPosition[0] = 0.0;
this->StartPosition[1] = 0.0;
this->EndPosition[0] = 0.0;
this->EndPosition[1] = 0.0;
}
//--------------------------------------------------------------------------
......
......@@ -62,6 +62,8 @@ vtkParallelCoordinatesHistogramRepresentation::vtkParallelCoordinatesHistogramRe
this->SetNumberOfInputPorts(vtkParallelCoordinatesHistogramRepresentation::NUM_INPUT_PORTS);
this->UseHistograms = 0;
this->HistogramLookupTableRange[0] = 0.0;
this->HistogramLookupTableRange[1] = -1.0;
this->HistogramFilter = vtkSmartPointer<vtkPairwiseExtractHistogram2D>::New();
this->HistogramFilter->SetInputData(this->InputArrayTable);
......
Supports Markdown
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