diff --git a/src/engine.c b/src/engine.c index d962105578c01f5bb9abf0c5f7c31c59ae22eda4..e285c74635beb5b807082a1be4f2ff2efdec845c 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1644,14 +1644,14 @@ void engine_makeproxies(struct engine *e) { #ifdef WITH_MPI const int *cdim = e->s->cdim; const struct space *s = e->s; - const struct cell *cells = s->cells; + struct cell *cells = s->cells; struct proxy *proxies = e->proxies; /* Prepare the proxies and the proxy index. */ if (e->proxy_ind == NULL) if ((e->proxy_ind = (int *)malloc(sizeof(int) * e->nr_nodes)) == NULL) error("Failed to allocate proxy index."); - for (k = 0; k < e->nr_nodes; k++) e->proxy_ind[k] = -1; + for (int k = 0; k < e->nr_nodes; k++) e->proxy_ind[k] = -1; e->nr_proxies = 0; /* The following loop is super-clunky, but it's necessary