the documentation https://developer.gnome.org/glib/stable/glib-Threads.html#g-once-init-enter says that
g_once_init_leave() should not be marked volatile. And, indeed, I get an incompatible pointer type warning if I declare the parameter variable as such. However, if I don’t use
volatileit seems that the function does not do what it is supposed to be doing.
I am working on Tracker and I wanted to get to a warning-free build, thus I tried to remove the
volatile from the declarations of
g_once_init_enter() sentinel variables . However, when I do this, a lot of tests fail.
Am I misinterpreting the documentation?