[devhelp] KeywordModel: fix compil warning (-Wcast-function-type)



commit 95559851b0ed6bac02ee349c8b6bd446a5199d18
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu May 10 18:32:19 2018 +0200

    KeywordModel: fix compil warning (-Wcast-function-type)
    
    This warning is enabled by -Wextra.

 devhelp/dh-keyword-model.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/devhelp/dh-keyword-model.c b/devhelp/dh-keyword-model.c
index 6367e24..bab5f97 100644
--- a/devhelp/dh-keyword-model.c
+++ b/devhelp/dh-keyword-model.c
@@ -445,6 +445,14 @@ search_single_book (DhBook          *book,
         return ret;
 }
 
+static gint
+link_compare (gconstpointer a,
+              gconstpointer b,
+              gpointer      user_data)
+{
+        return dh_link_compare (a, b);
+}
+
 static GQueue *
 search_books (SearchSettings  *settings,
               guint            max_hits,
@@ -487,7 +495,7 @@ search_books (SearchSettings  *settings,
                 _dh_util_queue_concat (ret, book_result);
         }
 
-        g_queue_sort (ret, (GCompareDataFunc) dh_link_compare, NULL);
+        g_queue_sort (ret, link_compare, NULL);
         return ret;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]