osdep/threads: fix warning: initializer element is not constant

This commit is contained in:
nanahi 2024-03-08 03:05:48 -05:00 committed by Kacper Michajłow
parent e9f966595c
commit fbea9607be
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ typedef pthread_once_t mp_once;
typedef pthread_t mp_thread_id;
typedef pthread_t mp_thread;
#define MP_STATIC_COND_INITIALIZER (mp_cond){ .cond = PTHREAD_COND_INITIALIZER, .clk_id = CLOCK_REALTIME }
#define MP_STATIC_COND_INITIALIZER { .cond = PTHREAD_COND_INITIALIZER, .clk_id = CLOCK_REALTIME }
#define MP_STATIC_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#define MP_STATIC_ONCE_INITIALIZER PTHREAD_ONCE_INIT

View File

@ -39,7 +39,7 @@ typedef HANDLE mp_thread;
typedef DWORD mp_thread_id;
#define MP_STATIC_COND_INITIALIZER CONDITION_VARIABLE_INIT
#define MP_STATIC_MUTEX_INITIALIZER (mp_mutex){ .srw = SRWLOCK_INIT }
#define MP_STATIC_MUTEX_INITIALIZER { .srw = SRWLOCK_INIT }
#define MP_STATIC_ONCE_INITIALIZER INIT_ONCE_STATIC_INIT
static inline int mp_mutex_init_type_internal(mp_mutex *mutex, enum mp_mutex_type mtype)