From 629bb48c77ecbe0869ae7c62b98a3b6d6ea50814 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durhama.ac.uk>
Date: Fri, 29 Jan 2016 15:25:04 +0000
Subject: [PATCH] clang-compatibility

---
 src/debug.c              | 2 +-
 src/runner_doiact_grav.h | 2 +-
 src/scheduler.c          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/debug.c b/src/debug.c
index 49273e6c1c..a48a41925c 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -75,7 +75,7 @@ void printgParticle(struct gpart *parts, long long int id, int N) {
           "## gParticle[%d]: id=%lld, x=[%.16e,%.16e,%.16e], "
           "v=[%.3e,%.3e,%.3e], a=[%.3e,%.3e,%.3e], m=%.3e, t_begin=%.3e, "
           "t_end=%.3e\n",
-          i, (parts[i].id < 0) ? -parts[i].id : parts[i].part->id,
+          i, parts[i].part->id,
           parts[i].x[0], parts[i].x[1], parts[i].x[2], parts[i].v[0],
           parts[i].v[1], parts[i].v[2], parts[i].a[0], parts[i].a[1],
           parts[i].a[2], parts[i].mass, parts[i].t_begin, parts[i].t_end);
diff --git a/src/runner_doiact_grav.h b/src/runner_doiact_grav.h
index 85329c95a4..dba2321365 100644
--- a/src/runner_doiact_grav.h
+++ b/src/runner_doiact_grav.h
@@ -582,7 +582,7 @@ void runner_dosub_grav(struct runner *r, struct cell *ci, struct cell *cj,
     /* Get the opening angle theta. */
     float dx[3], theta;
     for (k = 0; k < 3; k++) {
-      dx[k] = fabsf(ci->loc[k] - cj->loc[k]);
+      dx[k] = fabs(ci->loc[k] - cj->loc[k]);
       if (periodic && dx[k] > 0.5 * s->dim[k]) dx[k] = -dx[k] + s->dim[k];
       if (dx[k] > 0.0f) dx[k] -= ci->h[k];
     }
diff --git a/src/scheduler.c b/src/scheduler.c
index 41826ce221..468e835520 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -598,7 +598,7 @@ void scheduler_splittasks(struct scheduler *s) {
           /* Get the opening angle theta. */
           float dx[3], theta;
           for (k = 0; k < 3; k++) {
-            dx[k] = fabsf(ci->loc[k] - cj->loc[k]);
+            dx[k] = fabs(ci->loc[k] - cj->loc[k]);
             if (s->space->periodic && dx[k] > 0.5 * s->space->dim[k])
               dx[k] = -dx[k] + s->space->dim[k];
             if (dx[k] > 0.0f) dx[k] -= ci->h[k];
-- 
GitLab