mirror of
https://github.com/MariaDB/server.git
synced 2025-01-25 00:04:33 +01:00
UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Remove warnings on 64-bit systems.
This commit is contained in:
parent
3973a43041
commit
2d18390051
1 changed files with 8 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue