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)