From: Wolfgang Bangerth Date: Sat, 10 Jul 2021 02:04:39 +0000 (-0600) Subject: (void) a variable used only in an assertion. X-Git-Tag: v9.4.0-rc1~1116^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca25efbbe9fa14d5cf103b3d16659840f9642cdf;p=dealii.git (void) a variable used only in an assertion. --- 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();