mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
Silence the uninitialized warning from clang.
This commit is contained in:
@@ -496,7 +496,7 @@ bool free_fastpath(void *ptr, size_t size, bool size_hint) {
|
|||||||
assert(tsd_fast(tsd) ||
|
assert(tsd_fast(tsd) ||
|
||||||
*tsd_thread_deallocated_next_event_fastp_get_unsafe(tsd) == 0);
|
*tsd_thread_deallocated_next_event_fastp_get_unsafe(tsd) == 0);
|
||||||
|
|
||||||
emap_alloc_ctx_t alloc_ctx;
|
emap_alloc_ctx_t alloc_ctx JEMALLOC_CC_SILENCE_INIT({0, 0, false});
|
||||||
size_t usize;
|
size_t usize;
|
||||||
if (!size_hint) {
|
if (!size_hint) {
|
||||||
bool err = emap_alloc_ctx_try_lookup_fast(tsd,
|
bool err = emap_alloc_ctx_try_lookup_fast(tsd,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* wherever the compiler fails to recognize that the variable is never used
|
* wherever the compiler fails to recognize that the variable is never used
|
||||||
* uninitialized.
|
* uninitialized.
|
||||||
*/
|
*/
|
||||||
#define JEMALLOC_CC_SILENCE_INIT(v) = v
|
#define JEMALLOC_CC_SILENCE_INIT(...) = __VA_ARGS__
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# define likely(x) __builtin_expect(!!(x), 1)
|
# define likely(x) __builtin_expect(!!(x), 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user