[totem-pl-parser/wip/hadess/warning-fixes: 1/2] plparser: Fix g_once_init_enter() warnings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser/wip/hadess/warning-fixes: 1/2] plparser: Fix g_once_init_enter() warnings
- Date: Fri, 11 Feb 2022 09:36:33 +0000 (UTC)
commit 7a5989995993556cdce4a72c6986ec246339a683
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 11 10:33:14 2022 +0100
plparser: Fix g_once_init_enter() warnings
The "volatile" keyword was removed.
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from ../../../../Projects/jhbuild/totem-pl-parser/plparse/totem-pl-parser.c:128:
../../../../Projects/jhbuild/totem-pl-parser/plparse/totem-pl-parser.c: In function
‘totem_pl_parser_get_type’:
/usr/include/glib-2.0/glib/gatomic.h:113:5: warning: argument 2 of ‘__atomic_load’ discards ‘volatile’
qualifier [-Wincompatible-pointer-types]
113 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
| ^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
260 | (!g_atomic_pointer_get (location) && \
| ^~~~~~~~~~~~~~~~~~~~
../../../../Projects/jhbuild/totem-pl-parser/plparse/totem-pl-parser.c:307:13: note: in expansion of
macro ‘g_once_init_enter’
307 | if (g_once_init_enter (&g_define_type_id__volatile))
| ^~~~~~~~~~~~~~~~~
../../../../Projects/jhbuild/totem-pl-parser/plparse/totem-pl-parser.c: In function
‘totem_pl_parser_metadata_get_type’:
/usr/include/glib-2.0/glib/gatomic.h:113:5: warning: argument 2 of ‘__atomic_load’ discards ‘volatile’
qualifier [-Wincompatible-pointer-types]
113 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
| ^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
260 | (!g_atomic_pointer_get (location) && \
| ^~~~~~~~~~~~~~~~~~~~
../../../../Projects/jhbuild/totem-pl-parser/plparse/totem-pl-parser.c:2784:13: note: in expansion of
macro ‘g_once_init_enter’
2784 | if (g_once_init_enter (&g_define_type_id__volatile))
| ^~~~~~~~~~~~~~~~~
plparse/totem-pl-parser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index b16ccdb..cf8ef82 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -303,7 +303,7 @@ static gpointer totem_pl_parser_parent_class = NULL;
GType
totem_pl_parser_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))
{
const GTypeInfo g_define_type_info = {
@@ -2780,7 +2780,7 @@ totem_pl_parser_can_parse_from_uri (const char *uri, gboolean debug)
GType
totem_pl_parser_metadata_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))
{
/* NOTE: This is equivalent to the definition for GHashTable in gboxed.c, in that it uses the
same copy/free functions.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]