From 2d183900512ab2ee00e903622a80f73469faacd0 Mon Sep 17 00:00:00 2001 From: marko <> Date: Wed, 24 Oct 2007 10:49:11 +0000 Subject: [PATCH] UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Remove warnings on 64-bit systems. --- include/univ.i | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/univ.i b/include/univ.i index d845c1006ee..8163ae16e4e 100644 --- a/include/univ.i +++ b/include/univ.i @@ -309,22 +309,22 @@ typedef void* os_thread_ret_t; # define UNIV_MEM_FREE(addr, size) VALGRIND_MAKE_MEM_NOACCESS(addr, size) # define UNIV_MEM_ALLOC(addr, size) VALGRIND_MAKE_MEM_UNDEFINED(addr, size) # define UNIV_MEM_ASSERT_RW(addr, size) do { \ - const void* _p = (const void*) \ + const void* _p = (const void*) (ulint) \ VALGRIND_CHECK_MEM_IS_DEFINED(addr, size); \ if (UNIV_LIKELY_NULL(_p)) \ - fprintf(stderr, "%s:%d: %p[%u] undefined at %d\n", \ + fprintf(stderr, "%s:%d: %p[%u] undefined at %ld\n", \ __FILE__, __LINE__, \ - (const void*) (addr), (unsigned) (size), \ - ((const char*) _p) - ((const char*) (addr))); \ + (const void*) (addr), (unsigned) (size), (long) \ + (((const char*) _p) - ((const char*) (addr)))); \ } while (0) # define UNIV_MEM_ASSERT_W(addr, size) do { \ - const void* _p = (const void*) \ + const void* _p = (const void*) (ulint) \ VALGRIND_CHECK_MEM_IS_ADDRESSABLE(addr, size); \ if (UNIV_LIKELY_NULL(_p)) \ - fprintf(stderr, "%s:%d: %p[%u] unwritable at %d\n", \ + fprintf(stderr, "%s:%d: %p[%u] unwritable at %ld\n", \ __FILE__, __LINE__, \ - (const void*) (addr), (unsigned) (size), \ - ((const char*) _p) - ((const char*) (addr))); \ + (const void*) (addr), (unsigned) (size), (long) \ + (((const char*) _p) - ((const char*) (addr)))); \ } while (0) #else # define UNIV_MEM_VALID(addr, size) do {} while(0)