From 6f356557b114e0716a02539dc5a1687ea9a58195 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Mon, 30 Mar 2020 08:27:31 -0700 Subject: Remove compiler warnings (#843) * Fix compiler warnings with DIM=2 * Fix compiler warnings with USE_RZ=TRUE * Fix compiler warnings with USE_PSATD=TRUE and DIM=2 * Fix compiler warnings with USE_PSATD=TRUE and DIM=3 * Fix bug: discard only return value when calling DefineAndReturnParticleTile * Remove unused variables not triggering warnings --- .../SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp | 2 ++ .../SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp index 5af33e2cb..0478c2a6b 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp @@ -155,7 +155,9 @@ void GalileanAlgorithm::InitializeSpectralCoefficients(const SpectralKSpace& spe Array4 Theta2 = Theta2_coef[mfi].array(); // Extract reals (for portability on GPU) Real vx = v_galilean[0]; +#if (AMREX_SPACEDIM==3) Real vy = v_galilean[1]; +#endif Real vz = v_galilean[2]; // Loop over indices within one box diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H index 743d6d1c7..7ce774ab2 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H @@ -61,10 +61,11 @@ class SpectralBaseAlgorithm {}; // Modified finite-order vectors - KVectorComponent modified_kx_vec, modified_kz_vec; + KVectorComponent modified_kx_vec; #if (AMREX_SPACEDIM==3) KVectorComponent modified_ky_vec; #endif + KVectorComponent modified_kz_vec; }; #endif // WARPX_USE_PSATD -- cgit v1.2.3