]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some coverity complains 9337/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 15 Jan 2020 16:14:00 +0000 (09:14 -0700)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 15 Jan 2020 16:38:15 +0000 (09:38 -0700)
contrib/python-bindings/source/manifold_wrapper.cc
include/deal.II/base/mpi.h
source/grid/grid_generator.cc
source/lac/sparsity_pattern.cc
source/lac/trilinos_sparse_matrix.cc

index d364dc014a5279696cfa8adcc4e02159aaaea022..f5ccf84f490da46070983b57bffdcb2953421d8c 100644 (file)
@@ -120,6 +120,7 @@ namespace python
   ManifoldWrapper::ManifoldWrapper(const int dim, const int spacedim)
     : dim(dim)
     , spacedim(spacedim)
+    , manifold_ptr(nullptr)
   {
     AssertThrow(((dim == 2) && (spacedim == 2)) ||
                   ((dim == 2) && (spacedim == 3)) ||
index 22548c4140ce4129abe41ea9d6350c3098af7edb..37557429b39dc68c135193617a0913e273b4b672 100644 (file)
@@ -1588,9 +1588,10 @@ namespace Utilities
       }
 
       // Wait to have sent all objects.
-      MPI_Waitall(send_to.size(),
-                  buffer_send_requests.data(),
-                  MPI_STATUSES_IGNORE);
+      const int ierr = MPI_Waitall(send_to.size(),
+                                   buffer_send_requests.data(),
+                                   MPI_STATUSES_IGNORE);
+      AssertThrowMPI(ierr);
 
       return received_objects;
 #  endif // deal.II with MPI
index 99b9a09ec7919f159ffe2b7e5e018ec13efc7d45..357b53f530b648567c089375c05ac75010b64ecf 100644 (file)
@@ -162,7 +162,7 @@ namespace GridGenerator
         /**
          * Constructor.
          */
-        MeshGenerator(AdditionalData data)
+        MeshGenerator(const AdditionalData &data)
           : refinements(data.refinements)
           , n_subdivision_x_0(data.n_subdivision_x_0)
           , n_subdivision_x_1(data.n_subdivision_x_1)
index 177c6f3b081a730b34d5b6f8dd901f6c50ae9583..a47a6e04a0743c0a7d9b223be86f9a108bba1673 100644 (file)
@@ -39,7 +39,10 @@ __declspec(selectany) // Weak extern binding due to multiple link error
 
 SparsityPatternBase::SparsityPatternBase()
   : max_dim(0)
+  , rows(0)
+  , cols(0)
   , max_vec_len(0)
+  , max_row_length(0)
   , rowstart(nullptr)
   , colnums(nullptr)
   , compressed(false)
index 5e8b2f67a6fcf4c55cb1eb3dcd22b279bb4a6aea..da9ada4a616959457cc71d38267e39be42c10601 100644 (file)
@@ -2407,7 +2407,11 @@ namespace TrilinosWrappers
 
         for (int i = 0; i < matrix->NumMyRows(); ++i)
           {
-            matrix->ExtractMyRowView(i, num_entries, values, indices);
+            const int ierr =
+              matrix->ExtractMyRowView(i, num_entries, values, indices);
+            (void)ierr;
+            Assert(ierr == 0, ExcTrilinosError(ierr));
+
             for (TrilinosWrappers::types::int_type j = 0; j < num_entries; ++j)
               out << "(" << TrilinosWrappers::global_row_index(*matrix, i)
                   << ","

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.