fix c++ initializer warning

This commit is contained in:
daanx 2024-12-25 14:56:11 -08:00
parent efe10513ec
commit 27e0c467ae

View file

@ -97,7 +97,12 @@ const mi_page_t _mi_page_empty = {
// may lead to allocation itself on some platforms)
// --------------------------------------------------------
static mi_decl_cache_align mi_subproc_t subproc_main = { 0 }; // note: empty initializer to prevent running the constructor (in C++ compilation)
static mi_decl_cache_align mi_subproc_t subproc_main
#if __cplusplus
= { }; // empty initializer to prevent running the constructor (with msvc)
#else
= { 0 }; // C zero initialize
#endif
static mi_decl_cache_align mi_tld_t tld_empty = {
0, // thread_id