summaryrefslogtreecommitdiff
path: root/user/vte/gcc-volatile.patch
blob: 924d4e16be46593b9f3400a1867f55eccb20d3a6 (plain) (blame)
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
From 89e9230dc1a27b89cca16de32e903918a27b8e42 Mon Sep 17 00:00:00 2001
From: Christian Persch <chpe@src.gnome.org>
Date: Mon, 16 Nov 2020 20:27:48 +0100
Subject: [PATCH] lib: Drop wrong use of volatile

---
 src/vtetypebuiltins.cc.template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/vtetypebuiltins.cc.template b/src/vtetypebuiltins.cc.template
index dade41de7..3a50d4011 100644
--- a/src/vtetypebuiltins.cc.template
+++ b/src/vtetypebuiltins.cc.template
@@ -11,9 +11,9 @@
 GType
 @enum_name@_get_type (void)
 {
-  static volatile gsize g_define_type_id__volatile = 0;
+  static gsize g_define_type_id = 0;
  
-  if (g_once_init_enter (&g_define_type_id__volatile)) {
+  if (g_once_init_enter (&g_define_type_id)) {
     static const G@Type@Value values[] = {
 /*** END value-header ***/
 
@@ -24,13 +24,13 @@ GType
 /*** BEGIN value-tail ***/
       { 0, NULL, NULL }
     };
-    GType g_define_type_id = \
+    GType type_id = \
        g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
       
-    g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+    g_once_init_leave (&g_define_type_id, type_id);
   }
     
-  return g_define_type_id__volatile;
+  return g_define_type_id;
 }
 
 /*** END value-tail ***/
-- 
GitLab