[gcab] Remove incorrect volatile usage



commit d8054af4381dcef17ae691775c96a60116823047
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Aug 5 10:58:25 2022 +0400

    Remove incorrect volatile usage
    
    See also: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 libgcab/gcab-enums.c.etemplate | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgcab/gcab-enums.c.etemplate b/libgcab/gcab-enums.c.etemplate
index 2957403..194b1e0 100644
--- a/libgcab/gcab-enums.c.etemplate
+++ b/libgcab/gcab-enums.c.etemplate
@@ -30,9 +30,9 @@
 GType
 @enum_name@_get_type (void)
 {
-  static volatile gsize g_define_type_id__volatile = 0;
+  static gsize g_define_type_id_once = 0;
 
-  if (g_once_init_enter (&g_define_type_id__volatile))
+  if (g_once_init_enter (&g_define_type_id_once))
     {
       static const G@Type@Value values[] = {
 /*** END value-header ***/
@@ -46,10 +46,10 @@ GType
       };
       GType g_define_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_once, g_define_type_id);
     }
 
-  return g_define_type_id__volatile;
+  return g_define_type_id_once;
 }
 
 /*** END value-tail ***/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]