From: Daniel Arndt Date: Tue, 26 Jun 2018 00:28:23 +0000 (+0200) Subject: Avoid warning for an unused variable in step-20 X-Git-Tag: v9.1.0-rc1~978^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8026df30d28fed99f3353086e179d5cb1c33e04b;p=dealii.git Avoid warning for an unused variable in step-20 --- diff --git a/examples/step-20/step-20.cc b/examples/step-20/step-20.cc index c14df6ea6c..8710392aca 100644 --- a/examples/step-20/step-20.cc +++ b/examples/step-20/step-20.cc @@ -253,8 +253,13 @@ namespace Step20 void KInverse::value_list(const std::vector> &points, std::vector> & values) const { - Assert(points.size() == values.size(), - ExcDimensionMismatch(points.size(), values.size())); + // The value we are going to store for a given point does not depend on its + // coordinates and we use the `points` object only for checking that the + // `values` object has the correct size. In release mode, `AssertDimension` + // is defined empty and the compiler will complain that the `points` object + // is unused. The following line silences this warning. + (void)points; + AssertDimension(points.size(), values.size()); for (auto &value : values) {