From: Julian Seward Date: Mon, 2 Sep 2013 13:36:25 +0000 (+0000) Subject: MacOS only: fix somee compiler complaints about casting from pointers X-Git-Tag: svn/VALGRIND_3_9_0~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c09895b8e3f27164b6578b0ef8e65471aa9a4f38;p=thirdparty%2Fvalgrind.git MacOS only: fix somee compiler complaints about casting from pointers and integers of a different size. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13525 --- diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 1a032ec760..bdb7bf7a27 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -241,7 +241,7 @@ static inline void trigger_memcheck_error_if_undefined ( ULong x ) void* v; \ \ DO_INIT; \ - trigger_memcheck_error_if_undefined((ULong) zone); \ + trigger_memcheck_error_if_undefined((ULong)(UWord) zone); \ trigger_memcheck_error_if_undefined((ULong) n); \ MALLOC_TRACE(#fnname "(%p, %llu)", zone, (ULong)n ); \ \ @@ -443,7 +443,7 @@ static inline void trigger_memcheck_error_if_undefined ( ULong x ) void VG_REPLACE_FUNCTION_EZU(10040,soname,fnname) (void *zone, void *p) \ { \ DO_INIT; \ - trigger_memcheck_error_if_undefined((ULong) zone); \ + trigger_memcheck_error_if_undefined((ULong)(UWord) zone); \ MALLOC_TRACE(#fnname "(%p, %p)\n", zone, p ); \ if (p == NULL) \ return; \ @@ -577,7 +577,7 @@ static inline void trigger_memcheck_error_if_undefined ( ULong x ) void* v; \ \ DO_INIT; \ - trigger_memcheck_error_if_undefined((ULong) zone); \ + trigger_memcheck_error_if_undefined((ULong)(UWord) zone); \ trigger_memcheck_error_if_undefined((ULong) nmemb); \ trigger_memcheck_error_if_undefined((ULong) size); \ MALLOC_TRACE("zone_calloc(%p, %llu,%llu)", zone, (ULong)nmemb, (ULong)size ); \ @@ -708,7 +708,7 @@ static inline void trigger_memcheck_error_if_undefined ( ULong x ) void* v; \ \ DO_INIT; \ - trigger_memcheck_error_if_undefined((ULong) zone); \ + trigger_memcheck_error_if_undefined((ULong)(UWord) zone); \ trigger_memcheck_error_if_undefined((ULong) n); \ MALLOC_TRACE("zone_memalign(%p, al %llu, size %llu)", \ zone, (ULong)alignment, (ULong)n ); \ @@ -788,7 +788,7 @@ static inline void trigger_memcheck_error_if_undefined ( ULong x ) static int pszB = 0; \ if (pszB == 0) \ pszB = my_getpagesize(); \ - trigger_memcheck_error_if_undefined((ULong) zone); \ + trigger_memcheck_error_if_undefined((ULong)(UWord) zone); \ return VG_REPLACE_FUNCTION_EZU(10110,VG_Z_LIBC_SONAME,memalign) \ ((SizeT)pszB, size); \ } @@ -1038,8 +1038,8 @@ static size_t my_malloc_size ( void* zone, void* ptr ) /* Implement "malloc_size" by handing the request through to the tool's .tl_usable_size method. */ DO_INIT; - trigger_memcheck_error_if_undefined((ULong) zone); - trigger_memcheck_error_if_undefined((ULong) ptr); + trigger_memcheck_error_if_undefined((ULong)(UWord) zone); + trigger_memcheck_error_if_undefined((ULong)(UWord) ptr); size_t res = (size_t)VALGRIND_NON_SIMD_CALL1( info.tl_malloc_usable_size, ptr); return res;