summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-11-11 18:24:28 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2020-11-20 14:40:19 +0000
commit33612404397f87f0cd45da90d3aa9ab60df895ee (patch)
treeb470d39350abfbeeeefe8bd75ef820ae363424e6
parentf4607def1695efb50eb49e0586eed0f5557935f2 (diff)
downloadglib-33612404397f87f0cd45da90d3aa9ab60df895ee.tar.gz
gdbusconnection: Drop unnecessary volatile qualifiers from variables
This should introduce no API changes; there are public functions exported by `GDBusConnection` which still have some (incorrectly) `volatile` arguments, but dropping those qualifiers would be an API break. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #600
-rw-r--r--gio/gdbusconnection.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index ed8cf6219..91c365e80 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -393,7 +393,7 @@ struct _GDBusConnection
* FLAG_CLOSED is the closed property. It may be read at any time, but
* may only be written while holding @lock.
*/
- volatile gint atomic_flags;
+ gint atomic_flags; /* (atomic) */
/* If the connection could not be established during initable_init(),
* this GError will be set.
@@ -1596,7 +1596,7 @@ static gboolean
g_dbus_connection_send_message_unlocked (GDBusConnection *connection,
GDBusMessage *message,
GDBusSendMessageFlags flags,
- volatile guint32 *out_serial,
+ guint32 *out_serial,
GError **error)
{
guchar *blob;
@@ -1741,7 +1741,7 @@ g_dbus_connection_send_message (GDBusConnection *connection,
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
CONNECTION_LOCK (connection);
- ret = g_dbus_connection_send_message_unlocked (connection, message, flags, out_serial, error);
+ ret = g_dbus_connection_send_message_unlocked (connection, message, flags, (guint32 *) out_serial, error);
CONNECTION_UNLOCK (connection);
return ret;
}
@@ -1901,7 +1901,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
GDBusMessage *message,
GDBusSendMessageFlags flags,
gint timeout_msec,
- volatile guint32 *out_serial,
+ guint32 *out_serial,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1909,7 +1909,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
GTask *task;
SendMessageData *data;
GError *error = NULL;
- volatile guint32 serial;
+ guint32 serial;
if (out_serial == NULL)
out_serial = &serial;
@@ -2022,7 +2022,7 @@ g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
message,
flags,
timeout_msec,
- out_serial,
+ (guint32 *) out_serial,
cancellable,
callback,
user_data);
@@ -3082,7 +3082,7 @@ g_dbus_connection_get_peer_credentials (GDBusConnection *connection)
/* ---------------------------------------------------------------------------------------------------- */
-static volatile guint _global_filter_id = 1;
+static guint _global_filter_id = 1; /* (atomic) */
/**
* g_dbus_connection_add_filter:
@@ -3327,9 +3327,9 @@ args_to_rule (const gchar *sender,
return g_string_free (rule, FALSE);
}
-static volatile guint _global_subscriber_id = 1;
-static volatile guint _global_registration_id = 1;
-static volatile guint _global_subtree_registration_id = 1;
+static guint _global_subscriber_id = 1; /* (atomic) */
+static guint _global_registration_id = 1; /* (atomic) */
+static guint _global_subtree_registration_id = 1; /* (atomic) */
/* ---------------------------------------------------------------------------------------------------- */
@@ -5992,7 +5992,7 @@ g_dbus_connection_call_sync_internal (GDBusConnection *connection,
message,
send_flags,
timeout_msec,
- NULL, /* volatile guint32 *out_serial */
+ NULL, /* guint32 *out_serial */
cancellable,
&local_error);