[libhandy/libhandy-1-0] main: Remove volatile from g_once_init_* variables



commit 05fb9e428ebeb6a17e0862a98599d688009e2989
Author: Benjamin Berg <bberg redhat com>
Date:   Fri Dec 11 14:47:45 2020 +0100

    main: Remove volatile from g_once_init_* variables
    
    Here the passed pointer to the location is volatile, not the variable
    itself. Though even that volatile specifier is probably not needed.
    
    Fixes: #383

 src/hdy-main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-main.c b/src/hdy-main.c
index 6c5df7b0..008cdb2c 100644
--- a/src/hdy-main.c
+++ b/src/hdy-main.c
@@ -122,7 +122,7 @@ load_fallback_style (void)
 static void
 hdy_style_init (void)
 {
-  static volatile gsize guard = 0;
+  static gsize guard = 0;
   g_autoptr (GtkCssProvider) css_provider = NULL;
   GtkSettings *settings;
 
@@ -162,7 +162,7 @@ hdy_style_init (void)
 static void
 hdy_icons_init (void)
 {
-  static volatile gsize guard = 0;
+  static gsize guard = 0;
 
   if (!g_once_init_enter (&guard))
     return;


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