From ca25efbbe9fa14d5cf103b3d16659840f9642cdf Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Jul 2021 20:04:39 -0600 Subject: [PATCH] (void) a variable used only in an assertion. --- source/base/data_out_base.cc | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 9fbae84aed..3bcdef1df5 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -5467,11 +5467,14 @@ namespace DataOutBase // probably lead to all sorts of difficult error messages. Other than that, // trust the user that whatever they provide makes sense somehow. for (const auto &unit : flags.physical_units) - Assert( - unit.second.find('\"') == std::string::npos, - ExcMessage( - "A physical unit you provided, <" + unit.second + - ">, contained a quotation mark character. This is not allowed.")); + { + (void)unit; + Assert( + unit.second.find('\"') == std::string::npos, + ExcMessage( + "A physical unit you provided, <" + unit.second + + ">, contained a quotation mark character. This is not allowed.")); + } #ifndef DEAL_II_WITH_MPI // verify that there are indeed patches to be written out. most of the @@ -5907,11 +5910,14 @@ namespace DataOutBase // probably lead to all sorts of difficult error messages. Other than that, // trust the user that whatever they provide makes sense somehow. for (const auto &unit : flags.physical_units) - Assert( - unit.second.find('\"') == std::string::npos, - ExcMessage( - "A physical unit you provided, <" + unit.second + - ">, contained a quotation mark character. This is not allowed.")); + { + (void)unit; + Assert( + unit.second.find('\"') == std::string::npos, + ExcMessage( + "A physical unit you provided, <" + unit.second + + ">, contained a quotation mark character. This is not allowed.")); + } const unsigned int n_data_sets = data_names.size(); -- 2.39.5