From 8e010f4578f5422090cb0b0b720e537d402239a9 Mon Sep 17 00:00:00 2001 From: grahambenharper Date: Tue, 11 Feb 2020 11:53:15 -0700 Subject: [PATCH] Remove some unused variable warnings --- include/deal.II/base/vectorization.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 2b21d6f797..24739e5a37 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -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; } -- 2.39.5