Fix compiler warnings
- Fixed a mismatch data type.
- There are two compile warnings caused by g_once_init_enter(). The static variable can't be set to volatile.
https://docs.gtk.org/glib/type_func.Once.init_enter.html
While `location` has a volatile qualifier, this is a historical artifact and `the pointer passed to it` should not be volatile.