13
0

ytk: Fix function pointer casting compiler error with clang

This fixes the following compiler error.

../libs/tk/ytk/gtkscale.c:1474:50: error: incompatible function pointer types passing
'GCompareFunc' (aka 'int (*)(const void *, const void *)') to parameter of type
'GCompareDataFunc' (aka 'int (*)(const void *, const void *, void *)') [-Wincompatible-function-pointer-types]
    (GCompareFunc) compare_marks,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gslist.h:76:26: note: passing argument to parameter 'func' here
    GCompareDataFunc  func,
    ^
This commit is contained in:
Biswapriyo Nath 2024-02-21 09:59:34 +00:00 committed by Robin Gareus
parent b935710b60
commit 7e7d22e7d2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1471,7 +1471,7 @@ gtk_scale_add_mark (GtkScale *scale,
mark->position = position; mark->position = position;
priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark, priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark,
(GCompareFunc) compare_marks, (GCompareDataFunc) compare_marks,
GINT_TO_POINTER ( GINT_TO_POINTER (
gtk_range_get_inverted (GTK_RANGE (scale)) gtk_range_get_inverted (GTK_RANGE (scale))
)); ));