From 360599bef85e1cbd77808d0e2b5eebbcd4986118 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 16 Sep 2019 15:35:35 -0600 Subject: [PATCH] Avoid warnings as a result of an unused variable. --- .../base/tensor_product_polynomials_bubbles.h | 4 ++-- source/base/tensor_product_polynomials_bubbles.cc | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) 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, -- 2.39.5