[libsecret/wip/dueno/volatile: 1/2] Drop "volatile" for g_once_init_enter locations




commit 2c2b0abef76eb79b6c88b3868d509a12c16e5b0b
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sun May 2 16:57:13 2021 +0200

    Drop "volatile" for g_once_init_enter locations
    
    This fixes a few (fatal in gcc 11) warnings, breaking the CI.
    
    For the original discussion on why this change is needed, see
    https://gitlab.gnome.org/GNOME/glib/-/issues/600

 egg/egg-libgcrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/egg/egg-libgcrypt.c b/egg/egg-libgcrypt.c
index e215001..9617ebb 100644
--- a/egg/egg-libgcrypt.c
+++ b/egg/egg-libgcrypt.c
@@ -64,7 +64,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
 void
 egg_libgcrypt_initialize (void)
 {
-       static volatile gsize gcrypt_initialized = 0;
+       static size_t gcrypt_initialized = 0;
        unsigned seed;
 
        if (g_once_init_enter (&gcrypt_initialized)) {


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