From 7e7d22e7d26b8db3510174994ef2342935783a99 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Wed, 21 Feb 2024 09:59:34 +0000 Subject: [PATCH] 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, ^ --- libs/tk/ytk/gtkscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/tk/ytk/gtkscale.c b/libs/tk/ytk/gtkscale.c index 4317523fb8..3c09cd3ae8 100644 --- a/libs/tk/ytk/gtkscale.c +++ b/libs/tk/ytk/gtkscale.c @@ -1471,7 +1471,7 @@ gtk_scale_add_mark (GtkScale *scale, mark->position = position; priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark, - (GCompareFunc) compare_marks, + (GCompareDataFunc) compare_marks, GINT_TO_POINTER ( gtk_range_get_inverted (GTK_RANGE (scale)) ));