]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix_void_problem
authorYingli Li <142116485+liyli26@users.noreply.github.com>
Mon, 12 Aug 2024 20:53:53 +0000 (14:53 -0600)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Tue, 27 Aug 2024 15:00:38 +0000 (17:00 +0200)
source/base/function_lib.cc
source/base/mpi.cc
source/grid/tria.cc

index 2e9138080a9a95f9165bcdfe667ea2d05ef4d93a..2e2ec9e1ee47edf8b6171254bdb6e20cd9b955b1 100644 (file)
@@ -2405,7 +2405,7 @@ namespace Functions
                          const Point<1>         &p_unit,
                          const Point<1>         &dx)
     {
-      (void)p_unit;
+      [[mabe_unused]]p_unit;
       Tensor<1, 1> grad;
       grad[0] = (data_values[ix[0] + 1] - data_values[ix[0]]) / dx[0];
       return grad;
index e99ba8386d1d6d3481b9b00194cb9ba0e8b44d59..68e3dae9bfbc0b17963cefef8a89b5e9dc290156 100644 (file)
@@ -794,7 +794,7 @@ namespace Utilities
     void
     CollectiveMutex::lock(const MPI_Comm comm)
     {
-      (void)comm;
+      [[mabe_unused]]comm;
 
       Assert(
         !locked,
@@ -831,7 +831,7 @@ namespace Utilities
     void
     CollectiveMutex::unlock(const MPI_Comm comm)
     {
-      (void)comm;
+      [[mabe_unused]]comm;
 
       // First check if this function is called during exception handling
       // if so, abort. This can happen if a ScopedLock is destroyed.
index 3b4287380887b81da635955d6147f0d8c8037c3a..210ddf0453155eb7cc815c2a84c2c2eb0d978888 100644 (file)
@@ -3519,7 +3519,7 @@ namespace internal
             if (subcell_object->boundary_id !=
                 numbers::internal_face_boundary_id)
               {
-                (void)vertex_locations;
+                [[mabe_unused]]vertex_locations;
                 AssertThrow(
                   boundary_id != numbers::internal_face_boundary_id,
                   ExcMessage(
@@ -3549,7 +3549,7 @@ namespace internal
         // make sure that all subcelldata entries have been processed
         // TODO: this is not guaranteed, why?
         // AssertDimension(counter, boundary_objects_in.size());
-        (void)counter;
+        [[mabe_unused]]counter;
       }
 
 
@@ -5038,7 +5038,7 @@ namespace internal
                 triangulation.vertices[next_unused_vertex] = line->center(true);
 
                 bool pair_found = false;
-                (void)pair_found;
+                [[mabe_unused]]pair_found;
                 for (; next_unused_line != endl; ++next_unused_line)
                   if (!next_unused_line->used() &&
                       !(++next_unused_line)->used())
@@ -5808,7 +5808,7 @@ namespace internal
                 // two child lines.  To this end, find a pair of
                 // unused lines
                 bool pair_found = false;
-                (void)pair_found;
+                [[mabe_unused]]pair_found;
                 for (; next_unused_line != endl; ++next_unused_line)
                   if (!next_unused_line->used() &&
                       !(++next_unused_line)->used())
@@ -6232,7 +6232,7 @@ namespace internal
               for (const unsigned int line : quad->line_indices())
                 {
                   AssertIsNotUsed(new_lines[line]);
-                  (void)line;
+                  [[mabe_unused]]line;
                 }
 
               // 2) create new quads (properties are set below). Both triangles
@@ -6254,7 +6254,7 @@ namespace internal
               for (const auto &quad : new_quads)
                 {
                   AssertIsNotUsed(quad);
-                  (void)quad;
+                  [[mabe_unused]]quad;
                 }
 
               // 3) set vertex indices and set new vertex
@@ -11934,10 +11934,10 @@ namespace internal
         std::vector<unsigned int>                            &quad_cell_count)
       {
         AssertThrow(false, ExcNotImplemented());
-        (void)triangulation;
-        (void)cell;
-        (void)line_cell_count;
-        (void)quad_cell_count;
+        [[mabe_unused]]triangulation;
+        [[mabe_unused]]cell;
+        [[mabe_unused]]line_cell_count;
+        [[mabe_unused]]quad_cell_count;
       }
 
       template <int dim, int spacedim>
@@ -11955,7 +11955,7 @@ namespace internal
         Triangulation<dim, spacedim> &triangulation)
       {
         // nothing to do since anisotropy is not supported
-        (void)triangulation;
+        [[mabe_unused]]triangulation;
       }
 
       template <int dim, int spacedim>
@@ -12293,7 +12293,7 @@ void Triangulation<dim, spacedim>::set_all_manifold_ids_on_boundary(
             }
     }
 
-  (void)boundary_found;
+  [[mabe_unused]]boundary_found;
   Assert(boundary_found, ExcBoundaryIdNotFound(b_id));
 }
 
@@ -16304,7 +16304,7 @@ void Triangulation<dim, spacedim>::load_attached_data(
       // CellStatus::cell_will_persist.
       for (const auto &cell_rel : this->local_cell_relations)
         {
-          (void)cell_rel;
+          [[mabe_unused]]cell_rel;
           Assert((cell_rel.second == // cell_status
                   ::dealii::CellStatus::cell_will_persist),
                  ExcInternalError());

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.