[gnome-flashback] clipboard: fix cast-function-type warnings



commit d2ac5fc13ce71a083d7ea9a843442ba07e8a2e2e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Oct 10 16:54:31 2019 +0300

    clipboard: fix cast-function-type warnings

 gnome-flashback/libclipboard/gsd-clipboard-manager.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/gnome-flashback/libclipboard/gsd-clipboard-manager.c 
b/gnome-flashback/libclipboard/gsd-clipboard-manager.c
index 497e800..4d04987 100644
--- a/gnome-flashback/libclipboard/gsd-clipboard-manager.c
+++ b/gnome-flashback/libclipboard/gsd-clipboard-manager.c
@@ -105,7 +105,8 @@ target_data_ref (TargetData *data)
 }
 
 static void
-target_data_unref (TargetData *data)
+target_data_unref (TargetData *data,
+                   void       *user_data)
 {
         data->refcount--;
         if (data->refcount == 0) {
@@ -115,10 +116,11 @@ target_data_unref (TargetData *data)
 }
 
 static void
-conversion_free (IncrConversion *rdata)
+conversion_free (IncrConversion *rdata,
+                 void           *user_data)
 {
         if (rdata->data) {
-                target_data_unref (rdata->data);
+                target_data_unref (rdata->data, NULL);
         }
         free (rdata);
 }
@@ -248,15 +250,19 @@ save_targets (GsdClipboardManager *manager,
 
 static int
 find_content_target (TargetData *tdata,
-                     Atom        target)
+                     void       *user_data)
 {
+        Atom target = *(Atom *) user_data;
+
         return tdata->target == target;
 }
 
 static int
 find_content_type (TargetData *tdata,
-                   Atom        type)
+                   void       *user_data)
 {
+        Atom type = *(Atom *) user_data;
+
         return tdata->type == type;
 }
 
@@ -408,7 +414,7 @@ send_incrementally (GsdClipboardManager *manager,
                                             NULL);
 
                 manager->conversions = list_remove (manager->conversions, rdata);
-                conversion_free (rdata);
+                conversion_free (rdata, NULL);
         }
 
         return True;
@@ -600,7 +606,7 @@ collect_incremental (IncrConversion      *rdata,
                 manager->conversions = list_prepend (manager->conversions, rdata);
         else {
                 if (rdata->data) {
-                        target_data_unref (rdata->data);
+                        target_data_unref (rdata->data, NULL);
                         rdata->data = NULL;
                 }
                 free (rdata);


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