From: grahambenharper Date: Tue, 11 Feb 2020 18:53:15 +0000 (-0700) Subject: Remove some unused variable warnings X-Git-Tag: v9.2.0-rc1~533^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e010f4578f5422090cb0b0b720e537d402239a9;p=dealii.git Remove some unused variable warnings --- 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; }