From 42249f8e773e17d74e822b9190cf31fb08dce8e6 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Sun, 5 Nov 2017 19:48:37 +0000
Subject: [PATCH] Correct types for error messages.

---
 src/engine.c | 12 ++++++------
 src/runner.c |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/engine.c b/src/engine.c
index 5e7aa207f2..d9c9110c28 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -3922,15 +3922,15 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs,
 
 #ifdef SWIFT_DEBUG_CHECKS
   /* Check that we have the correct total mass in the top-level multipoles */
-  size_t num_gpart_mpole = 0;
+  long long num_gpart_mpole = 0;
   if (e->policy & engine_policy_self_gravity) {
     for (int i = 0; i < e->s->nr_cells; ++i)
       num_gpart_mpole += e->s->cells_top[i].multipole->m_pole.num_gpart;
     if (num_gpart_mpole != e->total_nr_gparts)
       error(
           "Top-level multipoles don't contain the total number of gpart "
-          "s->nr_gpart=%zd, "
-          "m_poles=%zd",
+          "s->nr_gpart=%lld, "
+          "m_poles=%lld",
           e->total_nr_gparts, num_gpart_mpole);
   }
 #endif
@@ -4113,14 +4113,14 @@ void engine_step(struct engine *e) {
 
 #ifdef SWIFT_DEBUG_CHECKS
   /* Check that we have the correct total mass in the top-level multipoles */
-  size_t num_gpart_mpole = 0;
+  long long num_gpart_mpole = 0;
   if (e->policy & engine_policy_self_gravity) {
     for (int i = 0; i < e->s->nr_cells; ++i)
       num_gpart_mpole += e->s->cells_top[i].multipole->m_pole.num_gpart;
     if (num_gpart_mpole != e->total_nr_gparts)
       error(
-          "Multipoles don't contain the total number of gpart mpoles=%zd "
-          "ngparts=%zd",
+          "Multipoles don't contain the total number of gpart mpoles=%lld "
+          "ngparts=%lld",
           num_gpart_mpole, e->total_nr_gparts);
   }
 #endif
diff --git a/src/runner.c b/src/runner.c
index 58b9b710cc..c9d119377b 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -1490,7 +1490,7 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
                 "g-particle (id=%lld, type=%s) did not interact "
                 "gravitationally "
                 "with all other gparts gp->num_interacted=%lld, "
-                "total_gparts=%zd (local num_gparts=%zd)",
+                "total_gparts=%lld (local num_gparts=%zd)",
                 gp->id_or_neg_offset, part_type_names[gp->type],
                 gp->num_interacted, e->total_nr_gparts, e->s->nr_gparts);
         }
-- 
GitLab