summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-06-28 12:23:38 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-06-28 12:25:08 +0400
commit61002aaa3bbbacbe47d3a52f5be0d8eab06912c6 (patch)
tree48178ce948de5d66f3aab2297bd961b272d2282a
parentedba707b32d47977e14f576854f61a0c1a569eab (diff)
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>
-rw-r--r--src/spice-grabsequence.c6
-rw-r--r--src/spice-session.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/spice-grabsequence.c b/src/spice-grabsequence.c
index 50e774d..dd454c9 100644
--- a/src/spice-grabsequence.c
+++ b/src/spice-grabsequence.c
@@ -29,14 +29,14 @@
GType spice_grab_sequence_get_type(void)
{
static GType grab_sequence_type = 0;
- static volatile gsize grab_sequence_type_volatile;
+ static gsize grab_sequence_type_once;
- if (g_once_init_enter(&grab_sequence_type_volatile)) {
+ if (g_once_init_enter(&grab_sequence_type_once)) {
grab_sequence_type = g_boxed_type_register_static
("SpiceGrabSequence",
(GBoxedCopyFunc)spice_grab_sequence_copy,
(GBoxedFreeFunc)spice_grab_sequence_free);
- g_once_init_leave(&grab_sequence_type_volatile,
+ g_once_init_leave(&grab_sequence_type_once,
grab_sequence_type);
}
diff --git a/src/spice-session.c b/src/spice-session.c
index d6ec344..bb3c6cd 100644
--- a/src/spice-session.c
+++ b/src/spice-session.c
@@ -239,11 +239,11 @@ GType
spice_image_compress_get_type (void)
{
static GType type = 0;
- static volatile gsize type_volatile = 0;
+ static gsize type_once = 0;
- if (g_once_init_enter(&type_volatile)) {
+ if (g_once_init_enter(&type_once)) {
type = g_enum_register_static ("SpiceImageCompress", _spice_image_compress_values);
- g_once_init_leave(&type_volatile, type);
+ g_once_init_leave(&type_once, type);
}
return type;