Fix bogus volatiles caught by gcc-11
This commit is contained in:
parent
11a73c9c3f
commit
0175734e85
26
gjs-gcc11.patch
Normal file
26
gjs-gcc11.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/gjs/error-types.cpp b/gjs/error-types.cpp
|
||||
index 86cb878..7045260 100644
|
||||
--- a/gjs/error-types.cpp
|
||||
+++ b/gjs/error-types.cpp
|
||||
@@ -31,7 +31,7 @@ G_DEFINE_QUARK(gjs-js-error-quark, gjs_js_error)
|
||||
// clang-format on
|
||||
|
||||
GType gjs_js_error_get_type(void) {
|
||||
- static volatile GType g_type_id;
|
||||
+ static GType g_type_id;
|
||||
|
||||
if (g_once_init_enter(&g_type_id)) {
|
||||
static GEnumValue errors[] = {
|
||||
diff --git a/libgjs-private/gjs-util.c b/libgjs-private/gjs-util.c
|
||||
index d4f7470..e420c78 100644
|
||||
--- a/libgjs-private/gjs-util.c
|
||||
+++ b/libgjs-private/gjs-util.c
|
||||
@@ -56,7 +56,7 @@ gjs_format_int_alternative_output(int n)
|
||||
GType
|
||||
gjs_locale_category_get_type(void)
|
||||
{
|
||||
- static volatile size_t g_define_type_id__volatile = 0;
|
||||
+ static size_t g_define_type_id__volatile = 0;
|
||||
if (g_once_init_enter(&g_define_type_id__volatile)) {
|
||||
static const GEnumValue v[] = {
|
||||
{ GJS_LOCALE_CATEGORY_ALL, "GJS_LOCALE_CATEGORY_ALL", "all" },
|
6
gjs.spec
6
gjs.spec
@ -5,7 +5,7 @@
|
||||
|
||||
Name: gjs
|
||||
Version: 1.66.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Javascript Bindings for GNOME
|
||||
|
||||
# The following files contain code from Mozilla which
|
||||
@ -15,6 +15,7 @@ Summary: Javascript Bindings for GNOME
|
||||
License: MIT and (MPLv1.1 or GPLv2+ or LGPLv2+)
|
||||
URL: https://wiki.gnome.org/Projects/Gjs
|
||||
Source0: https://download.gnome.org/sources/%{name}/1.66/%{name}-%{version}.tar.xz
|
||||
Patch0: %{name}-gcc11.patch
|
||||
|
||||
BuildRequires: cairo-gobject-devel
|
||||
BuildRequires: dbus-daemon
|
||||
@ -94,6 +95,9 @@ the functionality of the installed gjs package.
|
||||
%{_datadir}/installed-tests/
|
||||
|
||||
%changelog
|
||||
* Sat Oct 31 2020 Jeff Law <law@redhat.com> - 1.66.1-3
|
||||
- Fix bogus volatiles caught by gcc-11
|
||||
|
||||
* Mon Oct 19 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.66.1-2
|
||||
- Rebuild against mozjs78-78.4.0-1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user