On 16/04/2025 11.00, Paolo Bonzini wrote:
Il mer 16 apr 2025, 10:29 Daniel P. Berrangé <berra...@redhat.com
<mailto:berra...@redhat.com>> ha scritto:
> - secs = g_list_sort(secs, sort_secs);
> + secs = g_list_sort_with_data(secs, sort_secs, NULL);
I don't see what the problem is with the original code.
The commit message says we have a bad function cast, but the original
method decl is
GList *g_list_sort(GList*list, GCompareFunc compare_func);
where the callback is
typedef gint (*GCompareFunc)(gconstpointer a, gconstpointer b);
Our code complies with that GCompareFunc signature.
The cast is inside glib; g_list_sort casts the function pointer and calls
g_list_sort_with_data.
Did anybody already report this to the glib people? I guess it should get
fixed there in the long run...?
Thomas