From fbe755bd881535ebf703a4a3f6ef2dda48f033ac Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 29 Jun 2022 16:45:55 +0200 Subject: [PATCH] Fix warning about possibly uninitialized variables --- include/deal.II/grid/tria_accessor.templates.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.5