From 4edf439fd3e5e5d10dfcbca92a19eb3d5f8009df Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Sat, 25 Mar 2023 12:18:13 +0100
Subject: [PATCH] Silence a valgrind false positive in the gravity code.

---
 src/runner_doiact_grav.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/runner_doiact_grav.c b/src/runner_doiact_grav.c
index e0cadc530d..a05f62cb18 100644
--- a/src/runner_doiact_grav.c
+++ b/src/runner_doiact_grav.c
@@ -343,6 +343,7 @@ static INLINE void runner_dopair_grav_pp_full_no_cache(
     cache_i->a_y[i] += a_y;
     cache_i->a_z[i] += a_z;
     cache_i->pot[i] += pot;
+    cache_i->active[i] = 1;
   }
 
   /* Write back to the particle data */
@@ -546,6 +547,7 @@ static INLINE void runner_dopair_grav_pp_truncated_no_cache(
     cache_i->a_y[i] += a_y;
     cache_i->a_z[i] += a_z;
     cache_i->pot[i] += pot;
+    cache_i->active[i] = 1;
   }
 
   /* Write back to the particle data */
-- 
GitLab