From 35225441974e208a9a5075c8c82a41b2a12c2914 Mon Sep 17 00:00:00 2001 From: Philip Blakely Date: Thu, 21 Nov 2024 16:06:58 +0000 Subject: [PATCH] Fix dangling-reference error revealed by gcc 13.2 with -Werror -Wextra -Wall --- Src/Particle/AMReX_ParticleUtil.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Particle/AMReX_ParticleUtil.H b/Src/Particle/AMReX_ParticleUtil.H index f6f2506ec7..aa061013d0 100644 --- a/Src/Particle/AMReX_ParticleUtil.H +++ b/Src/Particle/AMReX_ParticleUtil.H @@ -870,7 +870,7 @@ void PermutationForDeposition (Gpu::DeviceVector& perm, index_type n PermutationForDeposition(perm, nitems, bx.numPts() * ref_product, [=] AMREX_GPU_DEVICE (index_type idx) noexcept { - const auto& p = make_particle{}(ptd,idx); + const auto p = make_particle{}(ptd,idx); IntVect iv = ((p.pos() - pos_offset) * dxi).round();