[MOAB-dev] r5696 - in MOAB/branches/mcm_kwfixes: itaps/imesh src src/io src/moab src/parallel src/parallel/moab tools/dagmc

mcmiller at mcs.anl.gov mcmiller at mcs.anl.gov
Wed Aug 15 01:53:47 CDT 2012


Author: mcmiller
Date: 2012-08-15 01:53:47 -0500 (Wed, 15 Aug 2012)
New Revision: 5696

Modified:
   MOAB/branches/mcm_kwfixes/itaps/imesh/iMeshP_MOAB.cpp
   MOAB/branches/mcm_kwfixes/src/BSPTreePoly.cpp
   MOAB/branches/mcm_kwfixes/src/Core.cpp
   MOAB/branches/mcm_kwfixes/src/FBEngine.cpp
   MOAB/branches/mcm_kwfixes/src/HigherOrderFactory.cpp
   MOAB/branches/mcm_kwfixes/src/OrientedBoxTreeTool.cpp
   MOAB/branches/mcm_kwfixes/src/SequenceData.cpp
   MOAB/branches/mcm_kwfixes/src/SmoothFace.cpp
   MOAB/branches/mcm_kwfixes/src/VarLenDenseTag.cpp
   MOAB/branches/mcm_kwfixes/src/io/FileTokenizer.cpp
   MOAB/branches/mcm_kwfixes/src/io/IODebugTrack.cpp
   MOAB/branches/mcm_kwfixes/src/io/IODebugTrack.hpp
   MOAB/branches/mcm_kwfixes/src/io/ReadSmf.cpp
   MOAB/branches/mcm_kwfixes/src/io/ReadTetGen.cpp
   MOAB/branches/mcm_kwfixes/src/io/Tqdcfr.cpp
   MOAB/branches/mcm_kwfixes/src/io/WriteSTL.cpp
   MOAB/branches/mcm_kwfixes/src/moab/ScdInterface.hpp
   MOAB/branches/mcm_kwfixes/src/parallel/ParallelComm.cpp
   MOAB/branches/mcm_kwfixes/src/parallel/WriteHDF5Parallel.cpp
   MOAB/branches/mcm_kwfixes/src/parallel/moab/ParallelComm.hpp
   MOAB/branches/mcm_kwfixes/tools/dagmc/obb_analysis.cpp
Log:
some fixes from Klocwork static analysis -- not yet tested

Modified: MOAB/branches/mcm_kwfixes/itaps/imesh/iMeshP_MOAB.cpp
===================================================================
--- MOAB/branches/mcm_kwfixes/itaps/imesh/iMeshP_MOAB.cpp	2012-08-15 02:53:22 UTC (rev 5695)
+++ MOAB/branches/mcm_kwfixes/itaps/imesh/iMeshP_MOAB.cpp	2012-08-15 06:53:47 UTC (rev 5696)
@@ -416,6 +416,8 @@
 {
   ErrorCode rval;
   ParallelComm* pcomm = PCOMM;
+  if (!pcomm)
+    ERROR (iBase_FAILURE,"No PComm");
   ALLOC_CHECK_ARRAY( part_ids, part_handles_size );
   for (int i = 0; i < part_handles_size; ++i) {
     int id;
@@ -439,6 +441,8 @@
 {
   ErrorCode rval;
   ParallelComm* pcomm = PCOMM;
+  if (!pcomm)
+    ERROR (iBase_FAILURE,"No PComm");
   ALLOC_CHECK_ARRAY( part_handles, part_ids_size );
   for (int i = 0; i < part_ids_size; ++i) {
     EntityHandle handle;
@@ -1528,6 +1532,8 @@
   // make exchange entity and processor list
   ErrorCode rval;
   ParallelComm* pcomm = PCOMM;
+  if (!pcomm)
+    ERROR (iBase_FAILURE,"No PComm");
   std::vector<unsigned int> exchange_procs;
   std::vector< Range* > exchange_ents;
 
@@ -1612,6 +1618,8 @@
          // need to update ParallelComm::update_shared_mesh to fix this
   
   ParallelComm* pcomm = PCOMM;
+  if (!pcomm)
+    ERROR (iBase_FAILURE,"No PComm");
   ErrorCode rval = pcomm->update_shared_mesh();
   CHKERR(rval,"update failed");
   RETURN (iBase_SUCCESS);
@@ -1626,6 +1634,8 @@
                       int *err )
 {
   ParallelComm* pcomm = PCOMM;
+  if (!pcomm)
+    ERROR (iBase_FAILURE,"No PComm");
   DimensionPair types;
   if (entity_topo != iMesh_ALL_TOPOLOGIES)
     types.first = types.second = mb_topology_table[entity_topo];
@@ -1669,6 +1679,8 @@
   std::vector<Tag> src_tags(1, itaps_cast<Tag>(source_tag));


More information about the moab-dev mailing list