[gtksourceview] ContextEngine: fix compil warnings (-Wcast-function-type)



commit 32e9fefb82bdf12d1f07b1cd224ece584315beec
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu May 10 21:16:54 2018 +0200

    ContextEngine: fix compil warnings (-Wcast-function-type)

 gtksourceview/gtksourcecontextengine.c |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/gtksourcecontextengine.c b/gtksourceview/gtksourcecontextengine.c
index 05b9b46..9b34c72 100644
--- a/gtksourceview/gtksourcecontextengine.c
+++ b/gtksourceview/gtksourcecontextengine.c
@@ -3228,8 +3228,9 @@ context_new (Context           *parent,
 }
 
 static void
-context_unref_hash_cb (G_GNUC_UNUSED gpointer  text,
-                      Context                *context)
+context_unref_hash_cb (gpointer  text,
+                      Context  *context,
+                      gpointer  user_data)
 {
        context->parent = NULL;
        context_unref (context);
@@ -3360,8 +3361,9 @@ context_unref (Context *context)
 }
 
 static void
-context_freeze_hash_cb (G_GNUC_UNUSED gpointer  text,
-                       Context                *context)
+context_freeze_hash_cb (gpointer  text,
+                       Context  *context,
+                       gpointer  user_data)
 {
        context_freeze (context);
 }
@@ -3416,6 +3418,13 @@ get_child_contexts_hash_cb (G_GNUC_UNUSED gpointer   text,
        *list = g_slist_prepend (*list, context);
 }
 
+static void
+context_thaw_cb (Context *ctx,
+                gpointer user_data)
+{
+       context_thaw (ctx);
+}
+
 /**
  * context_thaw:
  * @context: the context.
@@ -3447,7 +3456,7 @@ context_thaw (Context *ctx)
                                              (GHFunc) get_child_contexts_hash_cb,
                                              &children);
 
-                       g_slist_foreach (children, (GFunc) context_thaw, NULL);
+                       g_slist_foreach (children, (GFunc) context_thaw_cb, NULL);
                        g_slist_free (children);
                }
 


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