summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-03-08 03:05:48 -0500
committerKacper Michajłow <kasper93@gmail.com>2024-03-19 08:58:18 +0100
commitfbea9607be7aa7b650173fe7ac04c044e4e6609f (patch)
tree746a622a0ab2de21b0c1f3800ee8d617fb8b8ffe
parente9f966595c1dff092199c5d8c49a2d3132a32250 (diff)
downloadmpv-fbea9607be7aa7b650173fe7ac04c044e4e6609f.tar.bz2
mpv-fbea9607be7aa7b650173fe7ac04c044e4e6609f.tar.xz
osdep/threads: fix warning: initializer element is not constant
-rw-r--r--osdep/threads-posix.h2
-rw-r--r--osdep/threads-win32.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h
index b930506958..4b3bb902ac 100644
--- a/osdep/threads-posix.h
+++ b/osdep/threads-posix.h
@@ -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
diff --git a/osdep/threads-win32.h b/osdep/threads-win32.h
index dbce353a92..f1c654a5cb 100644
--- a/osdep/threads-win32.h
+++ b/osdep/threads-win32.h
@@ -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)