summaryrefslogtreecommitdiff
path: root/src/include/cctk.h
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-02-08 13:46:25 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-02-08 13:46:25 +0000
commit4d693fb7f7580bac81eb3f8b800c2b53097ff38d (patch)
tree8716b29bd537445fa68e8426e35b8842f61eca69 /src/include/cctk.h
parenta9205587edf38dec411bd5ab0248f8854e733cc1 (diff)
Define the variable cctki_dummy_int (which is used internally in the
DECLARE_CCTK_ARGUMENTS macro to do pointer arithmetics) of type 'ptrdiff_t' rather than 'int'. This prevents compiler warnings on 64-bit systems where pointer offsets are assumed as long ints. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4250 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk.h')
-rw-r--r--src/include/cctk.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/cctk.h b/src/include/cctk.h
index d94b5be6..e643be92 100644
--- a/src/include/cctk.h
+++ b/src/include/cctk.h
@@ -120,6 +120,9 @@
#ifdef CCODE
+/* get the definition of ptrdiff_t */
+#include <stdlib.h>
+
#include "cGH.h"
#include "cctk_ActiveThorns.h"
@@ -229,7 +232,7 @@ static inline int CCTK_GFINDEX4D (const cGH *GH, int i, int j, int k, int l)
#define _DECLARE_CCTK_ARGUMENTS _DECLARE_CCTK_CARGUMENTS
#define _DECLARE_CCTK_CARGUMENTS \
- int cctki_dummy_int;\
+ ptrdiff_t cctki_dummy_int;\
int cctk_dim = cctkGH->cctk_dim;\
int *cctk_gsh = cctkGH->cctk_gsh;\
int *cctk_lsh = cctkGH->cctk_lsh;\