From 4d693fb7f7580bac81eb3f8b800c2b53097ff38d Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 8 Feb 2006 13:46:25 +0000 Subject: 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 --- src/include/cctk.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/include/cctk.h') 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 + #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;\ -- cgit v1.2.3