The glib documentation shows use without volatile and mentions that -
While location has a volatile qualifier, this is a historical artifact and
the pointer passed to it should not be volatile.
https://developer.gnome.org/glib/stable/glib-Threads.html#g-once-init-enter