Skip to content

`g_once_init_enter()` parameter shouldn't be volatile anymore.

Avinash Sonawane requested to merge rootkea/libxfce4ui:volatile into master

Hello!

On latest master, clang throws following warning:

xfce-sm-client.c:864:8: warning: passing 'typeof (*(&inited)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
    if(g_once_init_enter(&inited)) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
    (!g_atomic_pointer_get (location) &&                             \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gatomic.h:117:38: note: expanded from macro 'g_atomic_pointer_get'
    __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                     ^~~~~~~~~~~~~~~~~

As per the docs pointer passed shouldn't be volatile.

Thanks!

Merge request reports