clang-16 fails to compile due to signature mismatch of TestDataFunc() glib-2.0 API
clang-16 can now error about function pointers mismatches which is triggering with few apps which use VAPI and glib-2.0
The error exhibited it something like below
| libsecret/test-vala-lang.p/test-vala-lang.c:1171:50: error: incompatible function pointer types passing 'void (gpointer)' (aka 'void (void *)') to parameter of type 'GTestDataFunc' (aka 'void (*)(const void *)') [-Wincompatible-function-pointer-types]
| g_test_add_data_func ("/vala/clear/sync", NULL, _test_clear_sync_gtest_data_func);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I looked into glib-2.0 and I see that GTestDataFunc
is defined as typedef void (*GTestDataFunc) (gconstpointer user_data);
in ./glib/gtestutils.h
however the generated testcase by vala from libsecret is calling this function as if it was typedef void (*GTestDataFunc) (gpointer user_data);
I wonder if its something that can be fixed in glib-2.0.vapi
or is it a vala compiler codegen thing.