[libhandy/benzea/fix-new-gcc-warnings] main: Remove volatile from g_once_init_* variables
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/benzea/fix-new-gcc-warnings] main: Remove volatile from g_once_init_* variables
- Date: Fri, 11 Dec 2020 13:50:10 +0000 (UTC)
commit fd76b1e5a3ea6f05723a52a4f6592c38330b08fa
Author: Benjamin Berg <bberg redhat com>
Date: Fri Dec 11 14:47:45 2020 +0100
main: Remove volatile from g_once_init_* variables
Here the passed pointer to the location is volatile, not the variable
itself. Though even that volatile specifier is probably not needed.
Fixes: #383
src/hdy-main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-main.c b/src/hdy-main.c
index 6c5df7b0..008cdb2c 100644
--- a/src/hdy-main.c
+++ b/src/hdy-main.c
@@ -122,7 +122,7 @@ load_fallback_style (void)
static void
hdy_style_init (void)
{
- static volatile gsize guard = 0;
+ static gsize guard = 0;
g_autoptr (GtkCssProvider) css_provider = NULL;
GtkSettings *settings;
@@ -162,7 +162,7 @@ hdy_style_init (void)
static void
hdy_icons_init (void)
{
- static volatile gsize guard = 0;
+ static gsize guard = 0;
if (!g_once_init_enter (&guard))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]