[MOAB-dev] r5349 - MOAB/trunk/test/parallel

jvporter at wisc.edu jvporter at wisc.edu
Wed Jan 25 23:17:30 CST 2012


Author: jvporter
Date: 2012-01-25 23:17:30 -0600 (Wed, 25 Jan 2012)
New Revision: 5349

Modified:
   MOAB/trunk/test/parallel/mbparallelcomm_test.cpp
   MOAB/trunk/test/parallel/partcheck.cpp
Log:
Fix more warnings (I'm leaving the silly optimization in partcheck.cpp for posterity)


Modified: MOAB/trunk/test/parallel/mbparallelcomm_test.cpp
===================================================================
--- MOAB/trunk/test/parallel/mbparallelcomm_test.cpp	2012-01-26 05:07:21 UTC (rev 5348)
+++ MOAB/trunk/test/parallel/mbparallelcomm_test.cpp	2012-01-26 05:17:30 UTC (rev 5349)
@@ -69,7 +69,7 @@
   err = MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 
     // start time
-  double stime, rtime, dtime, ltime;
+  double stime = 0, rtime = 0, dtime = 0, ltime = 0;
   if (0 == rank) stime = MPI_Wtime();
 
     // create MOAB instance based on that
@@ -455,13 +455,13 @@
 
     // get non-owned vertices
   result = pcs[0]->get_pstatus_entities(0, PSTATUS_NOT_OWNED, part_verts);
-  if (MB_SUCCESS != tmp_result) {
+  if (MB_SUCCESS != result) {
     std::cerr << "Couldn't get non-owned entities." << std::endl;
     return result;
   }
   int tot_verts;
   result = mbImpl->get_number_entities_by_dimension(0, 0, tot_verts);
-  if (MB_SUCCESS != tmp_result) {
+  if (MB_SUCCESS != result) {
     std::cerr << "Couldn't get number of vertices." << std::endl;
     return result;
   }

Modified: MOAB/trunk/test/parallel/partcheck.cpp
===================================================================
--- MOAB/trunk/test/parallel/partcheck.cpp	2012-01-26 05:07:21 UTC (rev 5348)
+++ MOAB/trunk/test/parallel/partcheck.cpp	2012-01-26 05:17:30 UTC (rev 5349)
@@ -29,7 +29,7 @@
 static const char* defstr( const char* mode )
 {
   static const char s[] = " (default)";
-  int len = (mode == DEFAULT_MODE) ? 0 : sizeof(s);
+  int len = (mode == DEFAULT_MODE) ? 0 : sizeof(s)-1;
   return s + len;
 }    
 










More information about the moab-dev mailing list