Fix build issues with gcc >=15
Building with gcc >= 15 introduces 2 build errors:
In file included from /var/home/carlos/Build/include/glib-2.0/glib/gasyncqueue.h:34,
from /var/home/carlos/Build/include/glib-2.0/glib.h:34,
from ../../../../Source/localsearch/src/libtracker-miners-common/tracker-debug.h:27,
from ../../../../Source/localsearch/src/libtracker-miners-common/tracker-debug.c:22:
../../../../Source/localsearch/src/libtracker-miners-common/tracker-debug.c: In function ‘tracker_miners_get_debug_flags’:
/var/home/carlos/Build/include/glib-2.0/glib/gthread.h:262:25: error: passing argument 2 of ‘g_once_impl’ from incompatible pointer type [-Wincompatible-pointer-types]
262 | g_once_impl ((once), (func), (arg)))
| ^~~~~~
| |
| void * (*)(void)
../../../../Source/localsearch/src/libtracker-miners-common/tracker-debug.c:63:9: note: in expansion of macro ‘g_once’
63 | g_once (&once, parse_debug_flags, NULL);
| ^~~~~~
/var/home/carlos/Build/include/glib-2.0/glib/gthread.h:235:66: note: expected ‘GThreadFunc’ {aka ‘void * (*)(void *)’} but argument is of type ‘void * (*)(void)’
235 | GThreadFunc func,
| ~~~~~~~~~~~~~~~~^~~~
../../../../Source/localsearch/src/libtracker-miners-common/tracker-debug.c:37:1: note: ‘parse_debug_flags’ declared here
37 | parse_debug_flags ()
| ^~~~~~~~~~~~~~~~~
/var/home/carlos/Build/include/glib-2.0/glib/gthread.h:49:20: note: ‘GThreadFunc’ declared here
49 | typedef gpointer (*GThreadFunc) (gpointer data);
| ^~~~~~~~~~~
../../../../Source/localsearch/tests/functional-tests/mockvolumemonitor/mock-drive.c:248:1: error: conflicting types for ‘mock_drive_drive_iface_init’; have ‘void(GDriveIface *)’ {aka ‘void(struct _GDriveIface *)’}
248 | mock_drive_drive_iface_init (GDriveIface *iface)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../Source/localsearch/tests/functional-tests/mockvolumemonitor/mock-drive.c:37:13: note: previous declaration of ‘mock_drive_drive_iface_init’ with type ‘void(void)’
37 | static void mock_drive_drive_iface_init ();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../Source/localsearch/tests/functional-tests/mockvolumemonitor/mock-drive.c:37:13: warning: ‘mock_drive_drive_iface_init’ used but never defined
../../../../Source/localsearch/tests/functional-tests/mockvolumemonitor/mock-drive.c:248:1: warning: ‘mock_drive_drive_iface_init’ defined but not used [-Wunused-function]
248 | mock_drive_drive_iface_init (GDriveIface *iface)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Even though it's alright that gcc is a bit more strict in the code it accepts, turning these into errors is arguably bad behavior contravening standards. There's no harm though in nudging the code so it's a little bit more correct.