]> https://gitweb.dealii.org/ - dealii.git/commitdiff
(void) a variable used only in an assertion.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 10 Jul 2021 02:04:39 +0000 (20:04 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 15 Jul 2021 16:35:54 +0000 (10:35 -0600)
source/base/data_out_base.cc

index 9fbae84aed6662b78ae63e23f3ab9a23db58d637..3bcdef1df584fb1d687f1c843422840cb0061b7d 100644 (file)
@@ -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();
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.