]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid warning regarding uninitialized variable 14282/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Sun, 18 Sep 2022 14:01:31 +0000 (16:01 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Sun, 18 Sep 2022 14:01:31 +0000 (16:01 +0200)
include/deal.II/lac/tensor_product_matrix.h

index 8734f694a2c8f09116064b32fd9b545655e5c675..14f7e023b161f8dd3c651a1e649a262131492dc4 100644 (file)
@@ -341,7 +341,8 @@ namespace internal
           std::array<Table<2, Number>, dim> &      eigenvectors,
           std::array<AlignedVector<Number>, dim> & eigenvalues)
     {
-      const int n_rows_1d = mass_matrices[0].n_cols();
+      const unsigned int n_rows_1d = mass_matrices[0].n_cols();
+      (void)n_rows_1d;
 
       for (unsigned int dir = 0; dir < dim; ++dir)
         {
@@ -376,7 +377,7 @@ namespace internal
           std::array<Table<2, VectorizedArray<Number>>, dim> &eigenvectors,
           std::array<AlignedVector<VectorizedArray<Number>>, dim> &eigenvalues)
     {
-      const int              n_rows_1d   = mass_matrix[0].n_cols();
+      const unsigned int     n_rows_1d   = mass_matrix[0].n_cols();
       constexpr unsigned int macro_size  = VectorizedArray<Number>::size();
       const std::size_t nm_flat_size_max = n_rows_1d * n_rows_1d * macro_size;
       const std::size_t n_flat_size_max  = n_rows_1d * macro_size;

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.