[gnome-online-accounts/wip/rishi/gcc-11-drop-volatile] daemon, goa, goabackend: Drop unnecessary volatile qualifiers
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/gcc-11-drop-volatile] daemon, goa, goabackend: Drop unnecessary volatile qualifiers
- Date: Wed, 30 Mar 2022 14:37:14 +0000 (UTC)
commit 7fcfaded9e46e9e9260604215a73eaaa578830c1
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Mar 30 16:16:37 2022 +0200
daemon, goa, goabackend: Drop unnecessary volatile qualifiers
See:
https://gitlab.gnome.org/GNOME/glib/-/commit/7c7623c4a31fb0f2a7
https://gitlab.gnome.org/GNOME/glib/-/commit/0604f5858259c32744
https://gitlab.gnome.org/GNOME/glib/-/commit/83e48d8ac1fee98059
https://gitlab.gnome.org/GNOME/glib/-/issues/600
src/daemon/goadaemon.c | 4 +---
src/goa/goaclient.c | 4 +---
src/goa/goaerror.c | 6 +++---
src/goabackend/goafedoraprovider.c | 4 +---
src/goabackend/goakerberosprovider.c | 4 +---
src/goaidentity/goaidentitymanagererror.c | 6 +++---
6 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index 0eb372eb..564973e1 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -250,15 +250,13 @@ on_network_monitor_network_changed (GoaDaemon *self, gboolean available)
static void
goa_daemon_init (GoaDaemon *self)
{
- static volatile GQuark goa_error_domain = 0;
GoaObjectSkeleton *object;
gchar *path;
/* this will force associating errors in the GOA_ERROR error domain
* with org.freedesktop.Goa.Error.* errors via g_dbus_error_register_error_domain().
*/
- goa_error_domain = GOA_ERROR;
- goa_error_domain; /* shut up -Wunused-but-set-variable */
+ goa_error_quark ();
goa_provider_ensure_builtins_loaded ();
diff --git a/src/goa/goaclient.c b/src/goa/goaclient.c
index c3b8c8bf..916c30d0 100644
--- a/src/goa/goaclient.c
+++ b/src/goa/goaclient.c
@@ -118,12 +118,10 @@ goa_client_finalize (GObject *object)
static void
goa_client_init (GoaClient *self)
{
- static volatile GQuark goa_error_domain = 0;
/* this will force associating errors in the GOA_ERROR error domain
* with org.freedesktop.Goa.Error.* errors via g_dbus_error_register_error_domain().
*/
- goa_error_domain = GOA_ERROR;
- goa_error_domain; /* shut up -Wunused-but-set-variable */
+ goa_error_quark ();
}
static void
diff --git a/src/goa/goaerror.c b/src/goa/goaerror.c
index fda9159e..6c75c9c2 100644
--- a/src/goa/goaerror.c
+++ b/src/goa/goaerror.c
@@ -45,10 +45,10 @@ GQuark
goa_error_quark (void)
{
G_STATIC_ASSERT (G_N_ELEMENTS (dbus_error_entries) == GOA_ERROR_NUM_ENTRIES);
- static volatile gsize quark_volatile = 0;
+ static gsize quark = 0;
g_dbus_error_register_error_domain ("goa-error-quark",
- &quark_volatile,
+ &quark,
dbus_error_entries,
G_N_ELEMENTS (dbus_error_entries));
- return (GQuark) quark_volatile;
+ return (GQuark) quark;
}
diff --git a/src/goabackend/goafedoraprovider.c b/src/goabackend/goafedoraprovider.c
index 36cb8086..b8d1c6f7 100644
--- a/src/goabackend/goafedoraprovider.c
+++ b/src/goabackend/goafedoraprovider.c
@@ -1361,7 +1361,6 @@ goa_fedora_provider_init (GoaFedoraProvider *provider)
static void
goa_fedora_provider_class_init (GoaFedoraProviderClass *fedora_class)
{
- static volatile GQuark goa_identity_manager_error_domain = 0;
GoaProviderClass *provider_class;
provider_class = GOA_PROVIDER_CLASS (fedora_class);
@@ -1381,6 +1380,5 @@ goa_fedora_provider_class_init (GoaFedoraProviderClass *fedora_class)
* org.gnome.Identity.Manager.Error.* errors via
* g_dbus_error_register_error_domain().
*/
- goa_identity_manager_error_domain = GOA_IDENTITY_MANAGER_ERROR;
- goa_identity_manager_error_domain; /* shut up -Wunused-but-set-variable */
+ goa_identity_manager_error_quark ();
}
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index b3ffc3f5..f4d28fd7 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1530,7 +1530,6 @@ goa_kerberos_provider_init (GoaKerberosProvider *provider)
static void
goa_kerberos_provider_class_init (GoaKerberosProviderClass *kerberos_class)
{
- static volatile GQuark goa_identity_manager_error_domain = 0;
GoaProviderClass *provider_class;
provider_class = GOA_PROVIDER_CLASS (kerberos_class);
@@ -1551,6 +1550,5 @@ goa_kerberos_provider_class_init (GoaKerberosProviderClass *kerberos_class)
* org.gnome.Identity.Manager.Error.* errors via
* g_dbus_error_register_error_domain().
*/
- goa_identity_manager_error_domain = GOA_IDENTITY_MANAGER_ERROR;
- goa_identity_manager_error_domain; /* shut up -Wunused-but-set-variable */
+ goa_identity_manager_error_quark ();
}
diff --git a/src/goaidentity/goaidentitymanagererror.c b/src/goaidentity/goaidentitymanagererror.c
index 28150c13..b96af7b6 100644
--- a/src/goaidentity/goaidentitymanagererror.c
+++ b/src/goaidentity/goaidentitymanagererror.c
@@ -35,10 +35,10 @@ GQuark
goa_identity_manager_error_quark (void)
{
G_STATIC_ASSERT (G_N_ELEMENTS (dbus_error_entries) == GOA_IDENTITY_MANAGER_ERROR_NUM_ENTRIES);
- static volatile gsize quark_volatile = 0;
+ static gsize quark = 0;
g_dbus_error_register_error_domain ("goa-identity-manager-error",
- &quark_volatile,
+ &quark,
dbus_error_entries,
G_N_ELEMENTS (dbus_error_entries));
- return (GQuark) quark_volatile;
+ return (GQuark) quark;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]