Silence the uninitialized warning from clang.

This commit is contained in:
guangli-dai 2025-04-10 15:07:20 -07:00 committed by Qi Wang
parent f81fb92a89
commit c20a63a765
2 changed files with 2 additions and 2 deletions

View file

@ -496,7 +496,7 @@ bool free_fastpath(void *ptr, size_t size, bool size_hint) {
assert(tsd_fast(tsd) ||
*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;
if (!size_hint) {
bool err = emap_alloc_ctx_try_lookup_fast(tsd,

View file

@ -29,7 +29,7 @@
* wherever the compiler fails to recognize that the variable is never used
* uninitialized.
*/
#define JEMALLOC_CC_SILENCE_INIT(v) = v
#define JEMALLOC_CC_SILENCE_INIT(...) = __VA_ARGS__
#ifdef __GNUC__
# define likely(x) __builtin_expect(!!(x), 1)