Add no-op bodies to VALGRIND_*() macro stubs.
Add no-op bodies to VALGRIND_*() macro stubs so that they can be used in contexts like the following without generating a compiler warning about the 'if' statement having an empty body: if (config_valgrind) VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
This commit is contained in:
parent
9f9897ad42
commit
a491585157
@ -440,16 +440,18 @@ static const bool config_ivsalloc =
|
|||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define RUNNING_ON_VALGRIND ((unsigned)0)
|
#define RUNNING_ON_VALGRIND ((unsigned)0)
|
||||||
#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)
|
#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed) \
|
||||||
#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB)
|
do {} while (0)
|
||||||
#define VALGRIND_FREELIKE_BLOCK(addr, rzB)
|
#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB) \
|
||||||
#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr, _qzz_len)
|
do {} while (0)
|
||||||
#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr, _qzz_len)
|
#define VALGRIND_FREELIKE_BLOCK(addr, rzB) do {} while (0)
|
||||||
#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr, _qzz_len)
|
#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr, _qzz_len) do {} while (0)
|
||||||
#define JEMALLOC_VALGRIND_MALLOC(cond, ptr, usize, zero)
|
#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr, _qzz_len) do {} while (0)
|
||||||
|
#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr, _qzz_len) do {} while (0)
|
||||||
|
#define JEMALLOC_VALGRIND_MALLOC(cond, ptr, usize, zero) do {} while (0)
|
||||||
#define JEMALLOC_VALGRIND_REALLOC(ptr, usize, old_ptr, old_usize, \
|
#define JEMALLOC_VALGRIND_REALLOC(ptr, usize, old_ptr, old_usize, \
|
||||||
old_rzsize, zero)
|
old_rzsize, zero) do {} while (0)
|
||||||
#define JEMALLOC_VALGRIND_FREE(ptr, rzsize)
|
#define JEMALLOC_VALGRIND_FREE(ptr, rzsize) do {} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "jemalloc/internal/util.h"
|
#include "jemalloc/internal/util.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user