[MOAB-dev] r4823 - in MOAB/trunk: src src/io/mhdf/example src/io/mhdf/src tools

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu May 12 10:56:23 CDT 2011


Author: kraftche
Date: 2011-05-12 10:56:22 -0500 (Thu, 12 May 2011)
New Revision: 4823

Modified:
   MOAB/trunk/src/Core.cpp
   MOAB/trunk/src/io/mhdf/example/validate.c
   MOAB/trunk/src/io/mhdf/src/file-desc.c
   MOAB/trunk/tools/convert.cpp
   MOAB/trunk/tools/makeops.cpp
   MOAB/trunk/tools/parse.cpp
   MOAB/trunk/tools/size.cpp
   MOAB/trunk/tools/skin.cpp
Log:
fix warnings reported by clang static analyzer

Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp	2011-05-12 15:24:13 UTC (rev 4822)
+++ MOAB/trunk/src/Core.cpp	2011-05-12 15:56:22 UTC (rev 4823)
@@ -1220,6 +1220,10 @@
       else {
         tmp_result = gMB->a_entity_factory()->get_adjacencies( *i, to_dimension, 
                                                    create_if_missing, temp_vec);
+        if (MB_SUCCESS != tmp_result) {
+          result = tmp_result;
+          continue;
+        }
       }
     }
 

Modified: MOAB/trunk/src/io/mhdf/example/validate.c
===================================================================
--- MOAB/trunk/src/io/mhdf/example/validate.c	2011-05-12 15:24:13 UTC (rev 4822)
+++ MOAB/trunk/src/io/mhdf/example/validate.c	2011-05-12 15:56:22 UTC (rev 4823)
@@ -198,7 +198,7 @@
   for (i = 0; i < desc->num_elem_desc; ++i) 
     sorted[i] = &desc->elems[i].desc;
   sorted[i++] = &desc->nodes;
-  sorted[i++] = &desc->sets;
+  sorted[i] = &desc->sets;
   qsort( sorted, ngrp, sizeof(struct mhdf_EntDesc*), &dcomp );
   for (i = 0; i < ngrp; ++i) {
     if (sorted[i]->count < 0) {
@@ -1109,15 +1109,15 @@
   for (i = 0; i < tag->num_dense_indices; ++i) {
     if (tag->dense_elem_indices[i] == -2) {
       name = mhdf_set_type_handle();
-      group = &desc->sets;
+      /*group = &desc->sets;*/
     }
     else if (tag->dense_elem_indices[i] == -1) {
       name = mhdf_node_type_handle();
-      group = &desc->nodes;
+      /*group = &desc->nodes;*/
     }
     else {
       name = desc->elems[ tag->dense_elem_indices[i] ].handle;
-      group = &desc->elems[ tag->dense_elem_indices[i] ].desc;
+      /*group = &desc->elems[ tag->dense_elem_indices[i] ].desc;*/
     }
       
     handles[0] = mhdf_openDenseTagData( file, tag->name, name, &count, &status );

Modified: MOAB/trunk/src/io/mhdf/src/file-desc.c
===================================================================


More information about the moab-dev mailing list