From db9c14a5746bb447102b38b760d0d6d05a489f5f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 29 Apr 2008 08:24:33 +0000 Subject: fix gcc warnings --- source/blender/blenpluginapi/intern/pluginapi.c | 78 +++++++++++++------------ 1 file changed, 40 insertions(+), 38 deletions(-) (limited to 'source/blender/blenpluginapi') diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c index ee1ac8f0ae2..e65148a0b04 100644 --- a/source/blender/blenpluginapi/intern/pluginapi.c +++ b/source/blender/blenpluginapi/intern/pluginapi.c @@ -53,6 +53,7 @@ #include "BLI_blenlib.h" /* util and noise functions */ #include "BLI_threads.h" /* For threadsfe guardedalloc malloc/calloc/free */ #include "IMB_imbuf.h" /* image buffer stuff */ +#define GET_INT_FROM_POINTER(i) ((int)(long)(i)) /* should use BKE_utildefines.h */ /* -------------------------------------------------------------------------- */ /* stuff from util.h */ @@ -321,42 +322,43 @@ int pluginapi_force_ref(void); int pluginapi_force_ref(void) { - return (int) mallocN + - (int) callocN + - (int) freeN + - (int) mallocT + - (int) callocT + - (int) freeT + - (int) allocImBuf + - (int) dupImBuf + - (int) freeImBuf + - (int) converttocmap + - (int) saveiff + - (int) loadiffmem + - (int) loadifffile + - (int) loadiffname + - (int) testiffname + - (int) onehalf + - (int) onethird + - (int) halflace + - (int) half_x + - (int) half_y + - (int) double_x + - (int) double_y + - (int) double_fast_x + - (int) double_fast_y + - (int) ispic + - (int) dit2 + - (int) dit0 + - (int) scaleImBuf + - (int) scalefastImBuf + - (int) scalefieldImBuf + - (int) scalefastfieldImBuf + - (int) hnoise + - (int) hnoisep + - (int) turbulence + - (int) turbulence1 + - (int) de_interlace + - (int) interlace + - (int) gamwarp; + return + GET_INT_FROM_POINTER( mallocN ) + + GET_INT_FROM_POINTER( callocN ) + + GET_INT_FROM_POINTER( freeN ) + + GET_INT_FROM_POINTER( mallocT ) + + GET_INT_FROM_POINTER( callocT ) + + GET_INT_FROM_POINTER( freeT ) + + GET_INT_FROM_POINTER( allocImBuf ) + + GET_INT_FROM_POINTER( dupImBuf ) + + GET_INT_FROM_POINTER( freeImBuf ) + + GET_INT_FROM_POINTER( converttocmap ) + + GET_INT_FROM_POINTER( saveiff ) + + GET_INT_FROM_POINTER( loadiffmem ) + + GET_INT_FROM_POINTER( loadifffile ) + + GET_INT_FROM_POINTER( loadiffname ) + + GET_INT_FROM_POINTER( testiffname ) + + GET_INT_FROM_POINTER( onehalf ) + + GET_INT_FROM_POINTER( onethird ) + + GET_INT_FROM_POINTER( halflace ) + + GET_INT_FROM_POINTER( half_x ) + + GET_INT_FROM_POINTER( half_y ) + + GET_INT_FROM_POINTER( double_x ) + + GET_INT_FROM_POINTER( double_y ) + + GET_INT_FROM_POINTER( double_fast_x ) + + GET_INT_FROM_POINTER( double_fast_y ) + + GET_INT_FROM_POINTER( ispic ) + + GET_INT_FROM_POINTER( dit2 ) + + GET_INT_FROM_POINTER( dit0 ) + + GET_INT_FROM_POINTER( scaleImBuf ) + + GET_INT_FROM_POINTER( scalefastImBuf ) + + GET_INT_FROM_POINTER( scalefieldImBuf ) + + GET_INT_FROM_POINTER( scalefastfieldImBuf ) + + GET_INT_FROM_POINTER( hnoise ) + + GET_INT_FROM_POINTER( hnoisep ) + + GET_INT_FROM_POINTER( turbulence ) + + GET_INT_FROM_POINTER( turbulence1 ) + + GET_INT_FROM_POINTER( de_interlace ) + + GET_INT_FROM_POINTER( interlace ) + + GET_INT_FROM_POINTER( gamwarp ); } -- cgit v1.2.3