testsuite/gtk/filterlistmodel.c: Avoid GCCism

Pointer arithmetic on gpointers (void *) is a GCCism, so avoid that by
being more explicit with things.
This commit is contained in:
Chun-wei Fan
2018-10-09 16:24:15 +08:00
parent 1ca906008e
commit cebf5ed46c

View File

@@ -180,14 +180,14 @@ static gboolean
is_near (gpointer item,
gpointer data)
{
return ABS (g_object_get_qdata (item, number_quark) - data) <= 2;
return ABS (GPOINTER_TO_INT (g_object_get_qdata (item, number_quark)) - GPOINTER_TO_INT (data)) <= 2;
}
static gboolean
is_not_near (gpointer item,
gpointer data)
{
return ABS (g_object_get_qdata (item, number_quark) - data) > 2;
return ABS (GPOINTER_TO_INT (g_object_get_qdata (item, number_quark)) - GPOINTER_TO_INT (data)) > 2;
}
static void