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

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Mar 9 10:19:36 CST 2011


Author: kraftche
Date: 2011-03-09 10:19:35 -0600 (Wed, 09 Mar 2011)
New Revision: 4556

Modified:
   MOAB/trunk/src/WriteUtil.cpp
   MOAB/trunk/src/io/WriteHDF5.cpp
Log:
fix some warnings reported by g++ w/ -O2

Modified: MOAB/trunk/src/WriteUtil.cpp
===================================================================
--- MOAB/trunk/src/WriteUtil.cpp	2011-03-09 06:22:24 UTC (rev 4555)
+++ MOAB/trunk/src/WriteUtil.cpp	2011-03-09 16:19:35 UTC (rev 4556)
@@ -868,7 +868,7 @@
     if (MBENTITYSET == type) {
       const MeshSetSequence* seq = reinterpret_cast<MeshSetSequence*>(iter.get_sequence());
       const MeshSet* set;
-      int len; size_t clen;
+      int len = 0; size_t clen;
       for (EntityHandle h = iter.get_start_handle(); h <= iter.get_end_handle(); ++h) {
         set = seq->get_set(h);
         switch (relation) {

Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp	2011-03-09 06:22:24 UTC (rev 4555)
+++ MOAB/trunk/src/io/WriteHDF5.cpp	2011-03-09 16:19:35 UTC (rev 4556)
@@ -505,10 +505,9 @@
     // see if we need to report times
   bool cputime = false;
   result = opts.get_null_option("CPUTIME");
-  if (MB_SUCCESS == result) {
+  if (MB_SUCCESS == result)
     cputime = true;
-    init_time = RUNTIME;
-  }
+  init_time = RUNTIME;
 
   dbgOut.tprint(1,"Gathering Mesh\n");
   
@@ -527,7 +526,7 @@
       return error(result);
   }
   
-  if (cputime) gather_time = RUNTIME;
+  gather_time = RUNTIME;
   
   //if (nodeSet.range.size() == 0)
   //  return error(MB_ENTITY_NOT_FOUND);
@@ -578,7 +577,7 @@
   if (MB_SUCCESS != result)
     return error(result);
 
-  if (cputime) create_time = RUNTIME;
+  create_time = RUNTIME;
 
   dbgOut.tprint(1,"Writing Nodes.\n");
   
@@ -589,7 +588,7 @@
       return error(result);


More information about the moab-dev mailing list