From: Daniel Arndt Date: Fri, 15 Jun 2018 11:06:11 +0000 (+0200) Subject: Fix unused variables in Debug mode X-Git-Tag: v9.1.0-rc1~1034^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98fd74cad111f70cb16b1c3595118cfd86752c4e;p=dealii.git Fix unused variables in Debug mode --- diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index 6357100cb1..2b8175afc7 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -1254,10 +1254,13 @@ KellyErrorEstimator::estimate( ExcIncompatibleNumberOfElements(solutions.size(), errors.size())); for (const auto &boundary_function : neumann_bc) - Assert(boundary_function.second->n_components == n_components, - ExcInvalidBoundaryFunction(boundary_function.first, - boundary_function.second->n_components, - n_components)); + { + (void)boundary_function; + Assert(boundary_function.second->n_components == n_components, + ExcInvalidBoundaryFunction(boundary_function.first, + boundary_function.second->n_components, + n_components)); + } Assert(component_mask.represents_n_components(n_components), ExcInvalidComponentMask()); diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index badb32ca89..f4aad3e062 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -349,10 +349,13 @@ KellyErrorEstimator<1, spacedim>::estimate( "value map.")); for (const auto boundary_function : neumann_bc) - Assert(boundary_function.second->n_components == n_components, - ExcInvalidBoundaryFunction(boundary_function.first, - boundary_function.second->n_components, - n_components)); + { + (void)boundary_function; + Assert(boundary_function.second->n_components == n_components, + ExcInvalidBoundaryFunction(boundary_function.first, + boundary_function.second->n_components, + n_components)); + } Assert(component_mask.represents_n_components(n_components), ExcInvalidComponentMask()); @@ -377,10 +380,13 @@ KellyErrorEstimator<1, spacedim>::estimate( ExcInvalidCoefficient()); for (const auto &boundary_function : neumann_bc) - Assert(boundary_function.second->n_components == n_components, - ExcInvalidBoundaryFunction(boundary_function.first, - boundary_function.second->n_components, - n_components)); + { + (void)boundary_function; + Assert(boundary_function.second->n_components == n_components, + ExcInvalidBoundaryFunction(boundary_function.first, + boundary_function.second->n_components, + n_components)); + } // reserve one slot for each cell and set it to zero for (unsigned int n = 0; n < n_solution_vectors; ++n)