From 2c2b0abef76eb79b6c88b3868d509a12c16e5b0b Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Sun, 2 May 2021 16:57:13 +0200 Subject: [PATCH 1/2] 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)) { From 86f5afbb107cea1dd22b342bdc514cfa0070f5c6 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 12 Jun 2021 13:29:36 +0200 Subject: [PATCH 2/2] Remove unnecessary "volatile" The documentation of g_dbus_error_register_error_domain suggests that the argument passed to it should not be volatile. Signed-off-by: Daiki Ueno --- libsecret/secret-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsecret/secret-util.c b/libsecret/secret-util.c index 1b4f13d..c145a44 100644 --- a/libsecret/secret-util.c +++ b/libsecret/secret-util.c @@ -89,7 +89,7 @@ _secret_list_get_type (void) GQuark secret_error_get_quark (void) { - static volatile gsize quark = 0; + static gsize quark = 0; static const GDBusErrorEntry entries[] = { { SECRET_ERROR_IS_LOCKED, "org.freedesktop.Secret.Error.IsLocked", },