aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2020-08-24 23:14:30 +0200
committerGravatar GitHub <noreply@github.com> 2020-08-24 14:14:30 -0700
commitbb58c764f9f21f8baac5e2fb1d81fed4983d1242 (patch)
tree3e1f5914d8f1e2be1168b79509718719745ebb93 /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
parent78f9be325d894bbae867aa279efdfd2212690825 (diff)
downloadWarpX-bb58c764f9f21f8baac5e2fb1d81fed4983d1242.tar.gz
WarpX-bb58c764f9f21f8baac5e2fb1d81fed4983d1242.tar.zst
WarpX-bb58c764f9f21f8baac5e2fb1d81fed4983d1242.zip
Fix some warnings (#1239)
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
index 73ad773f3..3e909145d 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
@@ -10,6 +10,7 @@
#include "FieldSolver/SpectralSolver/SpectralKSpace.H"
#include "FieldSolver/SpectralSolver/SpectralFieldData.H"
+#include <AMReX.H>
#if WARPX_USE_PSATD
@@ -29,7 +30,7 @@ class SpectralBaseAlgorithm
// The destructor should also be a virtual function, so that
// a pointer to subclass of `SpectraBaseAlgorithm` actually
// calls the subclass's destructor.
- virtual ~SpectralBaseAlgorithm() {};
+ virtual ~SpectralBaseAlgorithm() {}
/**
* \brief Virtual function for current correction in Fourier space
@@ -84,7 +85,11 @@ class SpectralBaseAlgorithm
#else
modified_kz_vec(spectral_kspace.getModifiedKComponent(dm,1,norder_z,nodal))
#endif
- {};
+ {
+#if (AMREX_SPACEDIM!=3)
+ amrex::ignore_unused(norder_y);
+#endif
+ }
// Modified finite-order vectors
KVectorComponent modified_kx_vec;