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=refs%2Fpull%2F6845%2Fhead;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) {