From: Martin Kronbichler Date: Wed, 29 Jun 2022 14:45:55 +0000 (+0200) Subject: Fix warning about possibly uninitialized variables X-Git-Tag: v9.5.0-rc1~1132^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14077%2Fhead;p=dealii.git Fix warning about possibly uninitialized variables --- diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 63c46968bf..992f1b1ded 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -1069,7 +1069,7 @@ namespace internal { // For 2D cells the access cell->line_orientation() is already // efficient - std::array line_indices; + std::array line_indices = {}; for (unsigned int line : cell.line_indices()) line_indices[line] = cell.line_index(line); return line_indices; @@ -1084,7 +1084,7 @@ namespace internal get_line_indices_of_cell( const TriaAccessor &cell) { - std::array line_indices; + std::array line_indices = {}; // For hexahedra, the classical access via quads -> lines is too // inefficient. Unroll this code here to allow the compiler to inline @@ -1164,7 +1164,7 @@ namespace internal { // For 2D cells the access cell->line_orientation() is already // efficient - std::array line_orientations; + std::array line_orientations = {}; for (unsigned int line : cell.line_indices()) line_orientations[line] = cell.line_orientation(line); return line_orientations; @@ -1180,7 +1180,7 @@ namespace internal static std::array get_line_orientations_of_cell(const TriaAccessor<3, dim, spacedim> &cell) { - std::array line_orientations; + std::array line_orientations = {}; // For hexahedra, the classical access via quads -> lines is too // inefficient. Unroll this code here to allow the compiler to inline