From b79864da5ced39e41a4b1d79749e5ed3fd3bd459 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Mon, 23 Nov 2020 11:25:55 +0100 Subject: [PATCH] Fix unitialised variable warning with GCC 7.1 --- src/space_regrid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/space_regrid.c b/src/space_regrid.c index 035c3f9209..e9ca3e238e 100644 --- a/src/space_regrid.c +++ b/src/space_regrid.c @@ -144,8 +144,8 @@ void space_regrid(struct space *s, int verbose) { * global partition is recomputed and the particles redistributed. * Be prepared to do that. */ #ifdef WITH_MPI - double oldwidth[3]; - double oldcdim[3]; + double oldwidth[3] = {0., 0., 0.}; + double oldcdim[3] = {0., 0., 0.}; int *oldnodeIDs = NULL; if (cdim[0] < s->cdim[0] || cdim[1] < s->cdim[1] || cdim[2] < s->cdim[2]) { -- GitLab