From 42ba8efaf220bceca7850f2ffe0d84ee426f7b34 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 16 Nov 2020 18:38:39 +0000 Subject: gnome: Drop use of volatile in GLib type functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://gitlab.gnome.org/GNOME/glib/-/issues/600 `volatile` was previously mistakenly used in GLib to indicate that a variable was accessed atomically or otherwise multi-threaded. It’s not meant for that, and up to date compilers (like gcc-11) will rightly warn about it. Drop the `volatile` qualifiers. Based on a patch by Jeff Law. See also http://isvolatileusefulwiththreads.in/c/. Signed-off-by: Philip Withnall --- mesonbuild/modules/gnome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/modules') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 9fd31c738..547aff17c 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1430,7 +1430,7 @@ class GnomeModule(ExtensionModule): GType %s@enum_name@_get_type (void) { - static volatile gsize gtype_id = 0; + static gsize gtype_id = 0; static const G@Type@Value values[] = {''' % func_prefix c_file_kwargs['vprod'] = ' { C_@TYPE@(@VALUENAME@), "@VALUENAME@", "@valuenick@" },' -- cgit v1.2.3