Commit 37def48e authored by Dan Wu's avatar Dan Wu
Browse files

Fixed some cppcheck warnings on uninitialized member variables.

parent 84b943c7
......@@ -9,7 +9,7 @@
namespace moab {
struct BSPTreePoly::Vertex : public CartVect {
Vertex( const CartVect& v ) : CartVect(v), usePtr(0)
Vertex( const CartVect& v ) : CartVect(v), usePtr(0), markVal(0)
#ifdef DEBUG_IDS
, id(nextID++)
#endif
......
......@@ -105,7 +105,8 @@ DebugOutput::DebugOutput( const DebugOutput& copy )
: linePfx(copy.linePfx),
outputImpl(copy.outputImpl),
mpiRank(copy.mpiRank),
verbosityLimit(copy.verbosityLimit)
verbosityLimit(copy.verbosityLimit),
initTime(copy.initTime)
{
outputImpl->referenceCount++;
assert(outputImpl->referenceCount > 1);
......@@ -117,6 +118,7 @@ DebugOutput& DebugOutput::operator=( const DebugOutput& copy )
outputImpl = copy.outputImpl;
mpiRank = copy.mpiRank;
verbosityLimit = copy.verbosityLimit;
initTime = copy.initTime;
outputImpl->referenceCount++;
assert(outputImpl->referenceCount > 1);
return *this;
......
......@@ -16,7 +16,7 @@ private:
protected:
EntitySequence( EntityHandle h )
: startHandle(h), endHandle(h) {}
: startHandle(h), endHandle(h), sequenceData(NULL) {}
EntitySequence( EntitySequence& split_from, EntityHandle here )
: startHandle( here ),
......
......@@ -39,7 +39,7 @@ const char GEOM_SENSE_N_SENSES_TAG_NAME[] = "GEOM_SENSE_N_SENSES";
GeomTopoTool::GeomTopoTool(Interface *impl, bool find_geoments, EntityHandle modelRootSet) :
mdbImpl(impl), sense2Tag(0), senseNEntsTag(0), senseNSensesTag(0),
geomTag(0), gidTag(0), modelSet(modelRootSet), obbTree(impl, NULL, true),
geomTag(0), gidTag(0), modelSet(modelRootSet), updated(false), obbTree(impl, NULL, true),
contiguous(true), oneVolRootSet(0)
{
......
......@@ -1044,8 +1044,8 @@ class RayIntersectSets : public OrientedBoxTreeTool::Op
tol(tolerance), minTolInt(min_tol_intersections),
intersections(inters), sets(surfaces), facets(facts),
rootSet(root_set), geomVol(geom_volume), senseTag(sense_tag),
desiredOrient(desired_orient), prevFacets(prev_facets),
raytri_test_count(tmp_count), lastSet(0)
desiredOrient(desired_orient), surfTriOrient_val(0), prevFacets(prev_facets),
raytri_test_count(tmp_count), lastSet(0), lastSetDepth(0)
{
// specified orientation should be 1 or -1, indicating ray and surface
// normal in the same or opposite directions, respectively.
......
......@@ -122,7 +122,7 @@ class TagOneTypeEqual {
int size;
public:
TagOneTypeEqual( const void* v )
: value(*reinterpret_cast<const T*>(v))
: value(*reinterpret_cast<const T*>(v)), size(0)
{}
bool operator()( const void* data ) const {
......@@ -141,7 +141,7 @@ class TagOneTypeLess {
int size;
public:
TagOneTypeLess( const void* v )
: value(*reinterpret_cast<const T*>(v))
: value(*reinterpret_cast<const T*>(v)), size(0)
{}
bool operator()( const void* data ) const {
......
......@@ -64,20 +64,19 @@ void TupleList::buffer::reset()
}
TupleList::TupleList(uint p_mi, uint p_ml, uint p_mul, uint p_mr, uint p_max)
: vi(NULL), vl(NULL), vul(NULL), vr(NULL),
last_sorted(-1)
{
vi = NULL;
vl = NULL;
vul = NULL;
vr = NULL;
initialize(p_mi, p_ml, p_mul, p_mr, p_max);
}
TupleList::TupleList()
: vi_rd(NULL), vl_rd(NULL), vul_rd(NULL), vr_rd(NULL),
mi(0), ml(0), mul(0), mr(0),
n(0), max(0),
vi(NULL), vl(NULL), vul(NULL), vr(NULL),
last_sorted(-1)
{
vi = NULL;
vl = NULL;
vul = NULL;
vr = NULL;
disableWriteAccess();
}
......
......@@ -19,7 +19,8 @@ IODebugTrack::IODebugTrack( bool enabled,
: enableOutput(enabled),
tableName(name),
ostr(output_stream),
maxSize(table_size)
maxSize(table_size),
haveMPI(false)
{
#ifdef MOAB_HAVE_MPI
MPI_Comm_rank( MPI_COMM_WORLD, &mpiRank );
......
......@@ -20,7 +20,9 @@ WriterIface *WriteCGNS::factory( Interface* iface )
{ return new WriteCGNS( iface ); }
WriteCGNS::WriteCGNS(Interface *impl)
: mbImpl(impl), VrtSize(0), EdgeSize(0), FaceSize(0), CellSize(0)
: mbImpl(impl), fileName(NULL), IndexFile(0), BaseName(NULL), IndexBase(0),
ZoneName(NULL), IndexZone(0), IndexSection(0), celldim(0), physdim(0),
VrtSize(0), EdgeSize(0), FaceSize(0), CellSize(0)
{
impl->query_interface(mWriteIface);
}
......
......@@ -49,7 +49,7 @@ protected:
public:
//! constructor, takes mdb instance
Skinner(Interface* mdb)
: thisMB(mdb), mDeletableMBTag(0), mAdjTag(0){}
: thisMB(mdb), mDeletableMBTag(0), mAdjTag(0), mTargetDim(0) {}
//! destructor
~Skinner();
......
......@@ -3578,6 +3578,7 @@ public:
OffsetHexCenterNodes(Interface* mb, double x, double y, double z)
: gMB(mb)
{
mCoords[0] = 0.0; mCoords[1] = 0.0; mCoords[2] = 0.0;
mOffset[0] = x; mOffset[1] = y; mOffset[2] = z;
}
......
......@@ -32,7 +32,7 @@ Coupler::Coupler(Interface *impl,
int coupler_id,
bool init_tree,
int max_ent_dim)
: mbImpl(impl), myPc(pc), myId(coupler_id), numIts(3), max_dim(max_ent_dim)
: mbImpl(impl), myPc(pc), myId(coupler_id), numIts(3), max_dim(max_ent_dim), _ntot(0)
{
assert(NULL != impl && (pc || !local_elems.empty()));
......
......@@ -766,7 +766,7 @@ namespace Element {
{0,1,0},
{0,0,1}};
LinearTet::LinearTet() : Map(0) {
LinearTet::LinearTet() : Map(0), det_T(0.0), det_T_inverse(0.0) {
}// LinearTet::LinearTet()
......
......@@ -19,19 +19,17 @@
namespace moab {
Intx2Mesh::Intx2Mesh(Interface * mbimpl): mb(mbimpl)
Intx2Mesh::Intx2Mesh(Interface * mbimpl): mb(mbimpl),
mbs1(0), mbs2(0), outSet(0),
RedFlagTag(0), redParentTag(0), blueParentTag(0), countTag(0),
redConn(NULL), blueConn(NULL),
dbg_1(0), epsilon_1(0.0), epsilon_area(0.0), box_error(0.0),
localRoot(0), my_rank(0)
#ifdef MOAB_HAVE_MPI
, parcomm(NULL), remote_cells(NULL), remote_cells_with_tracers(NULL)
#endif
, max_edges(0), counting(0)
{
dbg_1=0;
box_error=0;
my_rank=0;
RedFlagTag=0;
redParentTag =0;
blueParentTag = 0;
countTag = 0;
counting = 0;
}
Intx2Mesh::~Intx2Mesh()
......
......@@ -14,7 +14,7 @@
namespace moab {
Intx2MeshOnSphere::Intx2MeshOnSphere(Interface * mbimpl):Intx2Mesh(mbimpl)
Intx2MeshOnSphere::Intx2MeshOnSphere(Interface * mbimpl):Intx2Mesh(mbimpl), plane(0), R(0.0)
{
// TODO Auto-generated constructor stub
......
......@@ -10,7 +10,7 @@
namespace moab {
IntxRllCssphere::IntxRllCssphere(Interface * mbimpl):Intx2Mesh(mbimpl) {
IntxRllCssphere::IntxRllCssphere(Interface * mbimpl):Intx2Mesh(mbimpl), R(0.0), plane(0) {
// TODO Auto-generated constructor stub
}
......
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