[gnome-disk-utility/remove-incompatible-volatile-qualifiers: 6/6] Remove incompatible volatile qualifiers
- From: Kai Lüke <kailueke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/remove-incompatible-volatile-qualifiers: 6/6] Remove incompatible volatile qualifiers
- Date: Mon, 4 Apr 2022 19:58:53 +0000 (UTC)
commit c9bc1b3d56e631923aae9c7ae5ce27fdb1114f2a
Author: Kai Lüke <kailueke riseup net>
Date: Fri Apr 1 22:13:37 2022 +0200
Remove incompatible volatile qualifiers
The compiler warning "‘__atomic_load’ discards ‘volatile’ qualifier"
came up with GCC 11.
Remove the volatile usage which is also not used in similar newer
places of the code base.
src/disks/gduatasmartdialog.c | 2 +-
src/disks/gduenumtypes.c.template | 2 +-
src/libgdu/libgduenumtypes.c.template | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/disks/gduatasmartdialog.c b/src/disks/gduatasmartdialog.c
index 2deb6618..e474b8d8 100644
--- a/src/disks/gduatasmartdialog.c
+++ b/src/disks/gduatasmartdialog.c
@@ -601,7 +601,7 @@ attribute_get_details (const gchar *name,
const gchar **out_desc)
{
SmartDetails *details;
- static volatile gsize have_hash = 0;
+ static gsize have_hash = 0;
static GHashTable *smart_details_map = NULL;
gboolean ret;
diff --git a/src/disks/gduenumtypes.c.template b/src/disks/gduenumtypes.c.template
index f81b7101..d0988f53 100644
--- a/src/disks/gduenumtypes.c.template
+++ b/src/disks/gduenumtypes.c.template
@@ -12,7 +12,7 @@
GType
@enum_name@_get_type (void)
{
- static volatile gsize g_define_type_id__volatile = 0;
+ static gsize g_define_type_id__volatile = 0;
if (g_once_init_enter (&g_define_type_id__volatile))
{
diff --git a/src/libgdu/libgduenumtypes.c.template b/src/libgdu/libgduenumtypes.c.template
index bac75769..a56d875e 100644
--- a/src/libgdu/libgduenumtypes.c.template
+++ b/src/libgdu/libgduenumtypes.c.template
@@ -12,7 +12,7 @@
GType
@enum_name@_get_type (void)
{
- static volatile gsize g_define_type_id__volatile = 0;
+ static gsize g_define_type_id__volatile = 0;
if (g_once_init_enter (&g_define_type_id__volatile))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]