From: Daniel Arndt Date: Mon, 12 Dec 2022 22:33:38 +0000 (-0500) Subject: Address warnings about unused variables X-Git-Tag: v9.5.0-rc1~731^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ce4728d883c778ffe5b7cfa95773e8dcc8cb3f;p=dealii.git Address warnings about unused variables --- diff --git a/source/base/polynomials_rt_bubbles.cc b/source/base/polynomials_rt_bubbles.cc index edc10df6b9..8b7aadeb83 100644 --- a/source/base/polynomials_rt_bubbles.cc +++ b/source/base/polynomials_rt_bubbles.cc @@ -107,11 +107,18 @@ PolynomialsRT_Bubbles::evaluate( // of the curl part of the space const unsigned int n_derivatives = 3; double monoval_plus[dim][n_derivatives + 1]; - double monoval[dim][n_derivatives + 1]; + double monoval_i[dim][n_derivatives + 1]; - double monoval_i[dim][n_derivatives + 1]; - double monoval_j[dim][n_derivatives + 1]; - double monoval_jplus[dim][n_derivatives + 1]; + +#ifdef DEAL_II_HAVE_CXX17 + if constexpr (dim <= 1) +#else + if (dim <= 1) +#endif + { + (void)monoval_plus; + (void)monoval_i; + } unsigned int start = n_sub; #ifdef DEAL_II_HAVE_CXX17 @@ -207,6 +214,10 @@ PolynomialsRT_Bubbles::evaluate( else if (dim == 3) #endif { + double monoval[dim][n_derivatives + 1]; + double monoval_j[dim][n_derivatives + 1]; + double monoval_jplus[dim][n_derivatives + 1]; + // In 3d the first type of basis vector is // [ x^i * y^j * z^k * (j+k+2) ] // [ -[x^i]' * y^(j+1) * z^k ]