Skip to content

Commit

Permalink
An attempted fix for a gcc warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
CamelliaDPG committed Apr 7, 2022
1 parent fee53d4 commit d44261a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/intrepid2/src/Shared/Intrepid2_Data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ class ZeroView {
// extract the type of the first argument; use that for the arrays below
using int_type = std::tuple_element_t<0, std::tuple<IntArgs...>>;

const Kokkos::Array<int_type, numArgs> args {intArgs...};
const Kokkos::Array<int_type, numArgs+1> args {intArgs...,0}; // we pad with one extra entry (0) to avoid gcc compiler warnings about references beyond the bounds of the array (the [d+1]'s below)
Kokkos::Array<int_type, 7> refEntry;
for (int d=0; d<numArgs; d++)
{
Expand Down

0 comments on commit d44261a

Please sign in to comment.