]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove some unused variable warnings 9515/head
authorgrahambenharper <grahambenharper@gmail.com>
Tue, 11 Feb 2020 18:53:15 +0000 (11:53 -0700)
committergrahambenharper <grahambenharper@gmail.com>
Tue, 11 Feb 2020 18:55:38 +0000 (11:55 -0700)
include/deal.II/base/vectorization.h

index 2b21d6f797adb466db755ba097bd35be9723260d..24739e5a37c6bb4c77c73ea55c807d19bd95219c 100644 (file)
@@ -3324,6 +3324,11 @@ public:
   operator=(const double x)
   {
     data = vec_splats(x);
+
+    // Some compilers believe that vec_splats sets 'x', but that's not true.
+    // They then warn about setting a variable and not using it. Suppress the
+    // warning by "using" the variable:
+    (void)x;
     return *this;
   }
 
@@ -3558,6 +3563,11 @@ public:
   operator=(const float x)
   {
     data = vec_splats(x);
+
+    // Some compilers believe that vec_splats sets 'x', but that's not true.
+    // They then warn about setting a variable and not using it. Suppress the
+    // warning by "using" the variable:
+    (void)x;
     return *this;
   }
 

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.