1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
Index: device-src/s3.c
===================================================================
--- device-src/s3.c (revision 4697)
+++ device-src/s3.c (revision 4698)
@@ -1905,7 +1905,14 @@
gboolean s3_init(void)
{
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31))
+//# pragma GCC diagnostic push
+//# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+//# pragma GCC diagnostic pop
+#else
+ static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+#endif
static gboolean init = FALSE, ret;
/* n.b. curl_global_init is called in common-src/glib-util.c:glib_init() */
#Index: ChangeLog
#===================================================================
#--- ChangeLog (revision 4697)
#+++ ChangeLog (revision 4698)
#@@ -1,4 +1,8 @@
# 2012-05-08 Jean-Louis Martineau <martineau@zmanda.com>
#+ * common-src/amflock.c, common-src/match.c, common-src/util.c,
#+ device-src/s3.c: Fix for deprecated G_STATIC_MUTEX_INIT.
#+
#+2012-05-08 Jean-Louis Martineau <martineau@zmanda.com>
# * installcheck/Amanda_Device.pl: Fix indirect tcp.
#
# 2012-05-08 Jean-Louis Martineau <martineau@zmanda.com>
Index: common-src/util.c
===================================================================
--- common-src/util.c (revision 4697)
+++ common-src/util.c (revision 4698)
@@ -1147,7 +1147,14 @@
struct dirent *entry_p;
#endif
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31))
+//# pragma GCC diagnostic push
+//# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+//# pragma GCC diagnostic pop
+#else
+ static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+#endif
g_static_mutex_lock(&mutex);
Index: common-src/match.c
===================================================================
--- common-src/match.c (revision 4697)
+++ common-src/match.c (revision 4698)
@@ -153,7 +153,14 @@
* be called from within threads, so play it safe.
*/
-static GStaticMutex re_cache_mutex = G_STATIC_MUTEX_INIT;
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31))
+//# pragma GCC diagnostic push
+//# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+ static GStaticMutex re_cache_mutex = G_STATIC_MUTEX_INIT;
+//# pragma GCC diagnostic pop
+#else
+ static GStaticMutex re_cache_mutex = G_STATIC_MUTEX_INIT;
+#endif
static GHashTable *regex_cache = NULL, *regex_cache_newline = NULL;
/*
Index: common-src/amflock.c
===================================================================
--- common-src/amflock.c (revision 4697)
+++ common-src/amflock.c (revision 4698)
@@ -36,7 +36,14 @@
* New Implementation
*/
-static GStaticMutex lock_lock = G_STATIC_MUTEX_INIT;
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31))
+//# pragma GCC diagnostic push
+//# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+ static GStaticMutex lock_lock = G_STATIC_MUTEX_INIT;
+//# pragma GCC diagnostic pop
+#else
+ static GStaticMutex lock_lock = G_STATIC_MUTEX_INIT;
+#endif
static GHashTable *locally_locked_files = NULL;
static int lock_rw_rd(file_lock *lock, short l_type);
|