summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-03-16 21:44:54 +0100
committerCarlos Garnacho <carlosg@gnome.org>2021-03-18 10:34:12 +0100
commit3baa62ec3706a51dd7606bdacb033751859f65de (patch)
tree20753a64a9816b6a31abc9f407f87d61f58886e0
parenta0ca860aa8bb177cf3481dbaf22fb38ce558d9bf (diff)
downloadgnome-shell-wip/carlosg/volatile-warnings.tar.gz
hotplug-sniffer: Drop "volatile" from g_once_init_enter() sentinelswip/carlosg/volatile-warnings
As documented in g_once_init_enter(): "While @location has a volatile qualifier, this is a historical artifact and the pointer passed to it should not be volatile.". And effectively this now warns with modern glibc. Drop this from our logging function.
-rw-r--r--src/hotplug-sniffer/hotplug-sniffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hotplug-sniffer/hotplug-sniffer.c b/src/hotplug-sniffer/hotplug-sniffer.c
index 7fd812ea0..4b70ec72a 100644
--- a/src/hotplug-sniffer/hotplug-sniffer.c
+++ b/src/hotplug-sniffer/hotplug-sniffer.c
@@ -269,7 +269,7 @@ print_debug (const gchar *format, ...)
g_autofree char *timestamp = NULL;
va_list ap;
g_autoptr (GDateTime) now = NULL;
- static volatile gsize once_init_value = 0;
+ static size_t once_init_value = 0;
static gboolean show_debug = FALSE;
static guint pid = 0;