Skip to content

Warning: Discards ‘volatile’ qualifier

volatile needs to be removed
https://developer.gnome.org/glib/stable/glib-Threads.html#g-once-init-enter

While location has a volatile qualifier, this is a historical artifact and the pointer passed to it should not be volatile.

https://gitlab.xfce.org/xfce/xfce4-panel/-/blob/master/common/panel-debug.c#L66 https://gitlab.xfce.org/xfce/xfce4-panel/-/blob/master/libxfce4panel/xfce-panel-plugin-provider.c#L51

У файлі, який включено у /usr/include/glib-2.0/glib/gthread.h:32,
                 з /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 з /usr/include/glib-2.0/glib.h:32,
                 з panel-debug.c:27:
panel-debug.c: У функції ‘panel_debug_init’:
/usr/include/glib-2.0/glib/gatomic.h:117:5: попередження: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier [-Wincompatible-pointer-types]
  117 |     __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
      |     ^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: зауваження: у розгортанні макросу ‘g_atomic_pointer_get’
  260 |     (!g_atomic_pointer_get (location) &&                             \
      |       ^~~~~~~~~~~~~~~~~~~~
panel-debug.c:69:7: зауваження: у розгортанні макросу ‘g_once_init_enter’
   69 |   if (g_once_init_enter (&inited__volatile))
      |       ^~~~~~~~~~~~~~~~~
У файлі, який включено у /usr/include/glib-2.0/glib/gthread.h:32,
                 з /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 з /usr/include/glib-2.0/glib.h:32,
                 з /usr/include/gtk-3.0/gdk/gdkconfig.h:8,
                 з /usr/include/gtk-3.0/gdk/gdk.h:30,
                 з /usr/include/gtk-3.0/gtk/gtk.h:30,
                 з xfce-panel-plugin-provider.c:23:
xfce-panel-plugin-provider.c: У функції ‘IA__xfce_panel_plugin_provider_get_type’:
/usr/include/glib-2.0/glib/gatomic.h:117:5: попередження: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier [-Wincompatible-pointer-types]
  117 |     __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
      |     ^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: зауваження: у розгортанні макросу ‘g_atomic_pointer_get’
  260 |     (!g_atomic_pointer_get (location) &&                             \
      |       ^~~~~~~~~~~~~~~~~~~~
xfce-panel-plugin-provider.c:54:7: зауваження: у розгортанні макросу ‘g_once_init_enter’
   54 |   if (g_once_init_enter (&type__volatile))
      |       ^~~~~~~~~~~~~~~~~
Edited by lindevel