[MOAB-dev] r5739 - in MOAB/trunk/src: . io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Sep 14 12:35:15 CDT 2012


Author: tautges
Date: 2012-09-14 12:35:14 -0500 (Fri, 14 Sep 2012)
New Revision: 5739

Modified:
   MOAB/trunk/src/FBEngine.cpp
   MOAB/trunk/src/io/ReadCCMIO.cpp
Log:
Removing some compiler warnings.



Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp	2012-09-14 14:20:05 UTC (rev 5738)
+++ MOAB/trunk/src/FBEngine.cpp	2012-09-14 17:35:14 UTC (rev 5739)
@@ -822,32 +822,36 @@
     return MB_FAILURE;
   }
 
-  ErrorCode rval;
+  ErrorCode rval = MB_SUCCESS;
   adjs.clear();
   if (to_dim > this_dim) {
     int diffDim = to_dim-this_dim;
     rval = MBI->get_parent_meshsets(from, adjs, diffDim);
+    if (MB_SUCCESS != rval) return rval;
     if (diffDim>1)
     {
       // subtract the parents that come with diffDim-1 hops
       Range extra;
       rval = MBI->get_parent_meshsets(from, extra, diffDim-1);
+      if (MB_SUCCESS != rval) return rval;
       adjs = subtract(adjs, extra);
     }
 
   } else {
     int diffDim = this_dim - to_dim;
     rval = MBI->get_child_meshsets(from, adjs, diffDim);
+    if (MB_SUCCESS != rval) return rval;
     if (diffDim > 1)
     {
       // subtract the children that come with diffDim-1 hops
       Range extra;
       rval = MBI->get_child_meshsets(from, extra, diffDim-1);
+      if (MB_SUCCESS != rval) return rval;
       adjs = subtract(adjs, extra);
     }
   }
 
-  return MB_SUCCESS;
+  return rval;
 }
 
 // so far, this one is
@@ -2216,6 +2220,7 @@
           MBERRORR(MB_FAILURE, " can't get third node");
         CartVect Pt[3];
         rval = _mbImpl->get_coords(conn3, 3, (double*) &Pt[0]);
+        MBERRORR(rval, "Failed to get coords");
         int indexFirst = (thirdIndex + 1) % 3;
         int indexSecond = (thirdIndex + 2) % 3;
         int index[2] = { indexFirst, indexSecond };


More information about the moab-dev mailing list