From: Wolfgang Bangerth Date: Mon, 16 Sep 2019 21:35:35 +0000 (-0600) Subject: Avoid warnings as a result of an unused variable. X-Git-Tag: v9.2.0-rc1~1094^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=360599bef85e1cbd77808d0e2b5eebbcd4986118;p=dealii.git Avoid warnings as a result of an unused variable. --- diff --git a/include/deal.II/base/tensor_product_polynomials_bubbles.h b/include/deal.II/base/tensor_product_polynomials_bubbles.h index 77fddfaa41..580a1916f2 100644 --- a/include/deal.II/base/tensor_product_polynomials_bubbles.h +++ b/include/deal.II/base/tensor_product_polynomials_bubbles.h @@ -285,8 +285,8 @@ TensorProductPolynomialsBubbles::compute_derivative( { const unsigned int q_degree = tensor_polys.polynomials.size() - 1; const unsigned int max_q_indices = tensor_polys.n(); - const unsigned int n_bubbles = ((q_degree <= 1) ? 1 : dim); - Assert(i < max_q_indices + n_bubbles, ExcInternalError()); + Assert(i < max_q_indices + /* n_bubbles= */ ((q_degree <= 1) ? 1 : dim), + ExcInternalError()); // treat the regular basis functions if (i < max_q_indices) diff --git a/source/base/tensor_product_polynomials_bubbles.cc b/source/base/tensor_product_polynomials_bubbles.cc index bd70e3e2d2..3912dd03c5 100644 --- a/source/base/tensor_product_polynomials_bubbles.cc +++ b/source/base/tensor_product_polynomials_bubbles.cc @@ -70,8 +70,8 @@ TensorProductPolynomialsBubbles::compute_value(const unsigned int i, { const unsigned int q_degree = tensor_polys.polynomials.size() - 1; const unsigned int max_q_indices = tensor_polys.n(); - const unsigned int n_bubbles = ((q_degree <= 1) ? 1 : dim); - Assert(i < max_q_indices + n_bubbles, ExcInternalError()); + Assert(i < max_q_indices + /* n_bubbles= */ ((q_degree <= 1) ? 1 : dim), + ExcInternalError()); // treat the regular basis functions if (i < max_q_indices) @@ -109,8 +109,8 @@ TensorProductPolynomialsBubbles::compute_grad(const unsigned int i, { const unsigned int q_degree = tensor_polys.polynomials.size() - 1; const unsigned int max_q_indices = tensor_polys.n(); - const unsigned int n_bubbles = ((q_degree <= 1) ? 1 : dim); - Assert(i < max_q_indices + n_bubbles, ExcInternalError()); + Assert(i < max_q_indices + /* n_bubbles= */ ((q_degree <= 1) ? 1 : dim), + ExcInternalError()); // treat the regular basis functions if (i < max_q_indices) @@ -156,8 +156,8 @@ TensorProductPolynomialsBubbles::compute_grad_grad( { const unsigned int q_degree = tensor_polys.polynomials.size() - 1; const unsigned int max_q_indices = tensor_polys.n(); - const unsigned int n_bubbles = ((q_degree <= 1) ? 1 : dim); - Assert(i < max_q_indices + n_bubbles, ExcInternalError()); + Assert(i < max_q_indices + /* n_bubbles= */ ((q_degree <= 1) ? 1 : dim), + ExcInternalError()); // treat the regular basis functions if (i < max_q_indices) @@ -264,7 +264,8 @@ TensorProductPolynomialsBubbles::evaluate( { const unsigned int q_degree = tensor_polys.polynomials.size() - 1; const unsigned int max_q_indices = tensor_polys.n(); - const unsigned int n_bubbles = ((q_degree <= 1) ? 1 : dim); + (void)max_q_indices; + const unsigned int n_bubbles = ((q_degree <= 1) ? 1 : dim); Assert(values.size() == max_q_indices + n_bubbles || values.size() == 0, ExcDimensionMismatch2(values.size(), max_q_indices + n_bubbles, 0)); Assert(grads.size() == max_q_indices + n_bubbles || grads.size() == 0,