summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch')
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch
new file mode 100644
index 000000000..02816a887
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0017-gmessages-Drop-unnecessary-volatile-qualifiers-from-.patch
@@ -0,0 +1,44 @@
+From eee7e3c6688f2f1ee9beed5d6d209973c1df387e Mon Sep 17 00:00:00 2001
+From: Philip Withnall <pwithnall@endlessos.org>
+Date: Wed, 11 Nov 2020 19:14:25 +0000
+Subject: [PATCH 17/29] gmessages: Drop unnecessary volatile qualifiers from
+ macro variables
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It’s not necessary and provides no thread safety guarantees.
+
+Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
+
+Helps: #600
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
+---
+ glib/gmessages.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/glib/gmessages.h b/glib/gmessages.h
+index 6a28443b4..2e3650baf 100644
+--- a/glib/gmessages.h
++++ b/glib/gmessages.h
+@@ -478,7 +478,7 @@ g_debug (const gchar *format,
+ #if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING
+ #define g_warning_once(...) \
+ G_STMT_START { \
+- static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \
++ static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \
+ if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \
+ 0, 1)) \
+ g_warning (__VA_ARGS__); \
+@@ -487,7 +487,7 @@ g_debug (const gchar *format,
+ #elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING
+ #define g_warning_once(format...) \
+ G_STMT_START { \
+- static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \
++ static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \
+ if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \
+ 0, 1)) \
+ g_warning (format); \
+--
+2.30.1
+