[glib: 6/8] Fix missing field initializer in glib/deprecated/gthread.h
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/8] Fix missing field initializer in glib/deprecated/gthread.h
- Date: Fri, 7 May 2021 06:49:28 +0000 (UTC)
commit 83d46f6a0ac453ea343bf90951f39a38ae669425
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Wed Apr 28 10:44:40 2021 +0200
Fix missing field initializer in glib/deprecated/gthread.h
glib/deprecated/gthread-deprecated.c:473:42: warning: missing field 'unused' initializer
static const GStaticMutex init_mutex = G_STATIC_MUTEX_INIT;
^
glib/deprecated/gthread.h:128:36: note: expanded from macro 'G_STATIC_MUTEX_INIT'
^
glib/deprecated/gthread-deprecated.c:659:45: warning: missing field 'unused' initializer
static const GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
^
glib/deprecated/gthread.h:170:35: note: expanded from macro 'G_STATIC_REC_MUTEX_INIT'
^
glib/deprecated/gthread.h:128:36: note: expanded from macro 'G_STATIC_MUTEX_INIT'
^
glib/deprecated/gthread-deprecated.c:959:42: warning: missing field 'unused' initializer
static const GStaticRWLock init_lock = G_STATIC_RW_LOCK_INIT;
^
glib/deprecated/gthread.h:206:33: note: expanded from macro 'G_STATIC_RW_LOCK_INIT'
^
glib/deprecated/gthread.h:128:36: note: expanded from macro 'G_STATIC_MUTEX_INIT'
^
glib/deprecated/gthread.h | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h
index 33b422240..2d490a110 100644
--- a/glib/deprecated/gthread.h
+++ b/glib/deprecated/gthread.h
@@ -125,7 +125,11 @@ void g_thread_foreach (GFunc thread_func,
#endif
#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl GLIB_DEPRECATED_MACRO_IN_2_32
+#ifndef G_OS_WIN32
+#define G_STATIC_MUTEX_INIT { NULL, PTHREAD_MUTEX_INITIALIZER }
GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init)
+#else
#define G_STATIC_MUTEX_INIT { NULL } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init)
+#endif
typedef struct
{
GMutex *mutex;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]