From: Klaus Treichel Date: Sat, 31 Oct 2009 08:59:22 +0000 (+0100) Subject: Fix compiler warnings where sizeof(int) != sizeof(void *) X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=bf08959874ff7419c1dce724bedee2679b3ab0e6;p=francis%2Flibjit.git Fix compiler warnings where sizeof(int) != sizeof(void *) --- diff --git a/ChangeLog b/ChangeLog index fa58561..e765f0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-31 Klaus Treichel + + * jit/jit-compile.c (_JIT_RESULT_TO_OBJECT, _JIT_RESULT_FROM_OBJECT): + Fix compiler warnings on systems where sizeof(int) != sizeof(void *) + 2009-10-30 Aleksey Demakov * include/jit/jit-function.h, jit/jit-function.c diff --git a/jit/jit-compile.c b/jit/jit-compile.c index 59bcca6..8910912 100644 --- a/jit/jit-compile.c +++ b/jit/jit-compile.c @@ -50,8 +50,8 @@ typedef struct } _jit_compile_t; -#define _JIT_RESULT_TO_OBJECT(x) ((void *) ((int) (x) - JIT_RESULT_OK)) -#define _JIT_RESULT_FROM_OBJECT(x) ((int) ((void *) (x)) + JIT_RESULT_OK) +#define _JIT_RESULT_TO_OBJECT(x) ((void *) ((jit_nint) (x) - JIT_RESULT_OK)) +#define _JIT_RESULT_FROM_OBJECT(x) ((jit_nint) ((void *) (x)) + JIT_RESULT_OK) /* * This exception handler overrides a user-defined handler during compilation.