Fixing missing initializer in g_static_rec_mutex_init()

glib/deprecated/gthread-deprecated.c: In function ‘g_static_rec_mutex_init’:
glib/deprecated/gthread-deprecated.c:657:3: error: missing initializer for field ‘depth’ of ‘GStaticRecMutex’ {aka ‘const struct _GStaticRecMutex’} [-Werror=missing-field-initializers]
   static const GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
   ^~~~~~
In file included from glib/deprecated/gthread-deprecated.c:30:
glib/deprecated/gthread.h:161:9: note: ‘depth’ declared here
   guint depth;
         ^~~~~
This commit is contained in:
Emmanuel Fleury 2019-01-27 03:10:37 +01:00
parent 6e49b36cc2
commit 4cd8fccc11

View File

@ -171,7 +171,7 @@ struct _GStaticRecMutex
} unused;
};
#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT }
#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } }
GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_init)
void g_static_rec_mutex_init (GStaticRecMutex *mutex);