]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix void pointer issue
authorJerett Cherry <jerett97@gmail.com>
Mon, 12 Aug 2024 20:52:11 +0000 (14:52 -0600)
committerJerett Cherry <jerett97@gmail.com>
Mon, 12 Aug 2024 20:52:11 +0000 (14:52 -0600)
source/base/function_lib.cc

index bf1dad3ccd31c84f4494553b092920715596a324..90d7b90c7c8c5af6c31eb54f6fa3459b56e83576 100644 (file)
@@ -1941,7 +1941,7 @@ namespace Functions
   FourierCosineFunction<dim>::value(const Point<dim>  &p,
                                     const unsigned int component) const
   {
-    (void)component;
+    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return std::cos(fourier_coefficients * p);
   }
@@ -1953,7 +1953,7 @@ namespace Functions
   FourierCosineFunction<dim>::gradient(const Point<dim>  &p,
                                        const unsigned int component) const
   {
-    (void)component;
+    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return -fourier_coefficients * std::sin(fourier_coefficients * p);
   }
@@ -1965,7 +1965,7 @@ namespace Functions
   FourierCosineFunction<dim>::laplacian(const Point<dim>  &p,
                                         const unsigned int component) const
   {
-    (void)component;
+    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return (fourier_coefficients * fourier_coefficients) *
            (-std::cos(fourier_coefficients * p));
@@ -1991,7 +1991,7 @@ namespace Functions
   FourierSineFunction<dim>::value(const Point<dim>  &p,
                                   const unsigned int component) const
   {
-    (void)component;
+    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return std::sin(fourier_coefficients * p);
   }
@@ -2003,7 +2003,7 @@ namespace Functions
   FourierSineFunction<dim>::gradient(const Point<dim>  &p,
                                      const unsigned int component) const
   {
-    (void)component;
+    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return fourier_coefficients * std::cos(fourier_coefficients * p);
   }

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.