gplugin/gplugin

Remove volatile from variable for g_once_init_*.

2021-05-26, Elliott Sales de Andrade
62405791d543
Parents 722f46189c29
Children 577a6979dcec
Remove volatile from variable for g_once_init_*.

This causes a warning with GLib 2.67 and GCC 11.

Testing Done:
Compiled and saw no warnings.

Reviewed at https://reviews.imfreedom.org/r/672/
--- a/gplugin/gplugin-version.c Wed May 26 03:52:56 2021 -0500
+++ b/gplugin/gplugin-version.c Wed May 26 04:26:00 2021 -0500
@@ -47,9 +47,9 @@
static void
gplugin_version_lazy_init(void)
{
- static volatile gsize init_volatile = 0;
+ static gsize init = 0;
- if(g_once_init_enter(&init_volatile)) {
+ if(g_once_init_enter(&init)) {
GError *error = NULL;
regex =
@@ -62,7 +62,7 @@
g_error_free(error);
}
- g_once_init_leave(&init_volatile, 1);
+ g_once_init_leave(&init, 1);
}
}