From eec64066073428e38d5b0b6947ff302943188f65 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 4 Mar 2021 11:38:40 -0800 Subject: glib-2.0: Drop volatile qualifier Fixes glib/gatomic.h:112:5: error: argument 2 of '__atomic_load' discards 'volatile' qualifier [-Werror=incompatible-pointer-types] (From OE-Core rev: 06ac55a06f2300fa5442ec73a28c3f52022cc640) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...unnecessary-volatile-qualifiers-from-test.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch (limited to 'meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch') diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch b/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch new file mode 100644 index 0000000000..b8ed99ce15 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/0021-tests-Drop-unnecessary-volatile-qualifiers-from-test.patch @@ -0,0 +1,51 @@ +From 8a112c3c6e5fe6838ee29eec7caa62ba32d9bc40 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Wed, 11 Nov 2020 19:22:49 +0000 +Subject: [PATCH 21/29] tests: Drop unnecessary volatile qualifiers from tests +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These variables were already (correctly) accessed atomically. The +`volatile` qualifier doesn’t help with that. + +Signed-off-by: Philip Withnall + +Helps: #600 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] +--- + gobject/tests/qdata.c | 2 +- + gobject/tests/threadtests.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gobject/tests/qdata.c b/gobject/tests/qdata.c +index 528bdc68e..7d46efb15 100644 +--- a/gobject/tests/qdata.c ++++ b/gobject/tests/qdata.c +@@ -17,7 +17,7 @@ gboolean fail; + #define ROUNDS 10000 + + GObject *object; +-volatile gint bucket[THREADS]; ++gint bucket[THREADS]; /* accessed from multiple threads, but should never be contested due to the sequence of thread operations */ + + static gpointer + thread_func (gpointer data) +diff --git a/gobject/tests/threadtests.c b/gobject/tests/threadtests.c +index e341a9d67..b6f9e17fa 100644 +--- a/gobject/tests/threadtests.c ++++ b/gobject/tests/threadtests.c +@@ -27,8 +27,8 @@ + #include + #include + +-static volatile int mtsafe_call_counter = 0; /* multi thread safe call counter */ +-static int unsafe_call_counter = 0; /* single-threaded call counter */ ++static int mtsafe_call_counter = 0; /* multi thread safe call counter, must be accessed atomically */ ++static int unsafe_call_counter = 0; /* single-threaded call counter */ + static GCond sync_cond; + static GMutex sync_mutex; + +-- +2.30.1 + -- cgit v1.2.3-54-g00ecf