From cebf5ed46cc326fd4eacfc434e83d1b581cff1f9 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Tue, 9 Oct 2018 16:24:15 +0800 Subject: [PATCH] testsuite/gtk/filterlistmodel.c: Avoid GCCism Pointer arithmetic on gpointers (void *) is a GCCism, so avoid that by being more explicit with things. --- testsuite/gtk/filterlistmodel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/gtk/filterlistmodel.c b/testsuite/gtk/filterlistmodel.c index 1e259789dc..07fdf77b6f 100644 --- a/testsuite/gtk/filterlistmodel.c +++ b/testsuite/gtk/filterlistmodel.c @@ -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