[Xfce4-commits] [xfce/xfce4-appfinder] 01/01: Fix gcc8 warnings

noreply at xfce.org noreply at xfce.org
Sun Jun 10 07:04:03 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-appfinder.

commit 1e752dafbe991a2bb3f5d40b77d9f3c37c4c4d0c
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Jun 10 01:53:53 2018 -0300

    Fix gcc8 warnings
---
 src/appfinder-actions.c        |  6 ++++--
 src/appfinder-category-model.c |  8 +++++---
 src/appfinder-model.c          | 28 ++++++++++++++--------------
 src/appfinder-window.c         |  2 +-
 src/main.c                     |  2 +-
 5 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/src/appfinder-actions.c b/src/appfinder-actions.c
index e71d16f..d4eab56 100644
--- a/src/appfinder-actions.c
+++ b/src/appfinder-actions.c
@@ -34,7 +34,8 @@
 
 
 static void xfce_appfinder_actions_finalize (GObject              *object);
-static void xfce_appfinder_actions_free     (XfceAppfinderAction  *action);
+static void xfce_appfinder_actions_free     (XfceAppfinderAction  *action,
+                                             gpointer              user_data);
 static void xfce_appfinder_actions_load     (XfceAppfinderActions *actions,
                                              gboolean              steal);
 static void xfce_appfinder_actions_save     (XfceAppfinderActions *actions,
@@ -132,7 +133,8 @@ xfce_appfinder_actions_finalize (GObject *object)
 
 
 static void
-xfce_appfinder_actions_free (XfceAppfinderAction *action)
+xfce_appfinder_actions_free (XfceAppfinderAction *action,
+                             gpointer             user_data)
 {
   g_free (action->pattern);
   g_free (action->command);
diff --git a/src/appfinder-category-model.c b/src/appfinder-category-model.c
index 57e0e55..4e5a009 100644
--- a/src/appfinder-category-model.c
+++ b/src/appfinder-category-model.c
@@ -75,7 +75,8 @@ static gboolean           xfce_appfinder_category_model_iter_nth_child        (G
 static gboolean           xfce_appfinder_category_model_iter_parent           (GtkTreeModel             *tree_model,
                                                                                GtkTreeIter              *iter,
                                                                                GtkTreeIter              *child);
-static void               xfce_appfinder_category_category_free               (CategoryItem             *item);
+static void               xfce_appfinder_category_category_free               (CategoryItem             *item,
+                                                                               gpointer                  user_data);
 
 
 
@@ -457,7 +458,8 @@ xfce_appfinder_category_model_iter_parent (GtkTreeModel *tree_model,
 
 
 static void
-xfce_appfinder_category_category_free (CategoryItem *item)
+xfce_appfinder_category_category_free (CategoryItem *item,
+                                       gpointer      user_data)
 {
   if (item->directory != NULL)
     g_object_unref (G_OBJECT (item->directory));
@@ -533,7 +535,7 @@ xfce_appfinder_category_model_set_categories (XfceAppfinderCategoryModel *model,
   model->categories = g_slist_prepend (model->categories, item);
 
   item = g_slice_new0 (CategoryItem);
-  item->directory = g_object_ref (G_OBJECT (model->all_applications));
+  item->directory = GARCON_MENU_DIRECTORY (g_object_ref (G_OBJECT (model->all_applications)));
   model->categories = g_slist_prepend (model->categories, item);
 
   path = gtk_tree_path_new_first ();
diff --git a/src/appfinder-model.c b/src/appfinder-model.c
index 2e227dc..87a1e09 100644
--- a/src/appfinder-model.c
+++ b/src/appfinder-model.c
@@ -355,9 +355,9 @@ xfce_appfinder_model_finalize (GObject *object)
   g_slist_foreach (model->items, (GFunc) xfce_appfinder_model_item_free, model);
   g_slist_free (model->items);
 
-  g_slist_foreach (model->collect_categories, (GFunc) g_object_unref, NULL);
+  g_slist_foreach (model->collect_categories, (GFunc) (void (*)(void)) g_object_unref, NULL);
   g_slist_free (model->collect_categories);
-  g_slist_foreach (model->categories, (GFunc) g_object_unref, NULL);
+  g_slist_foreach (model->categories, (GFunc) (void (*)(void)) g_object_unref, NULL);
   g_slist_free (model->categories);
 
   g_hash_table_destroy (model->items_hash);
@@ -788,7 +788,7 @@ xfce_appfinder_model_collect_idle (gpointer user_data)
 
       xfce_appfinder_model_categories_changed (model);
 
-      g_slist_foreach (tmp, (GFunc) g_object_unref, NULL);
+      g_slist_foreach (tmp, (GFunc) (void (*)(void)) g_object_unref, NULL);
       g_slist_free (tmp);
     }
 
@@ -881,7 +881,7 @@ xfce_appfinder_model_item_new (GarconMenuItem *menu_item)
   appfinder_return_val_if_fail (GARCON_IS_MENU_ITEM (menu_item), NULL);
 
   item = g_slice_new0 (ModelItem);
-  item->item = g_object_ref (G_OBJECT (menu_item));
+  item->item = GARCON_MENU_ITEM (g_object_ref (G_OBJECT (menu_item)));
 
   appfinder_refcount_debug_add (G_OBJECT (menu_item),
      garcon_menu_item_get_desktop_id (menu_item));
@@ -1072,8 +1072,8 @@ xfce_appfinder_model_history_insert (XfceAppfinderModel *model,
   /* add new command */
   item = g_slice_new0 (ModelItem);
   item->command = g_strdup (command);
-  item->icon = g_object_ref (G_OBJECT (model->command_icon));
-  item->icon_large = g_object_ref (G_OBJECT (model->command_icon_large));
+  item->icon = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon)));
+  item->icon_large = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon_large)));
   model->items = g_slist_insert_sorted (model->items, item, xfce_appfinder_model_item_compare);
 
   /* find the item and the position */
@@ -1214,7 +1214,7 @@ xfce_appfinder_model_history_monitor (XfceAppfinderModel *model,
         {
           APPFINDER_DEBUG ("monitor history file %s", path);
 
-          model->history_file = g_object_ref (G_OBJECT (file));
+          model->history_file = G_FILE (g_object_ref (G_OBJECT (file)));
           g_signal_connect (G_OBJECT (model->history_monitor), "changed",
               G_CALLBACK (xfce_appfinder_model_history_changed), model);
         }
@@ -1392,7 +1392,7 @@ xfce_appfinder_model_bookmarks_monitor (XfceAppfinderModel *model,
         {
           APPFINDER_DEBUG ("monitor bookmarks file %s", path);
 
-          model->bookmarks_file = g_object_ref (G_OBJECT (file));
+          model->bookmarks_file = G_FILE (g_object_ref (G_OBJECT (file)));
           g_signal_connect (G_OBJECT (model->bookmarks_monitor), "changed",
               G_CALLBACK (xfce_appfinder_model_bookmarks_changed), model);
         }
@@ -1461,8 +1461,8 @@ xfce_appfinder_model_collect_history (XfceAppfinderModel *model,
         {
           item = g_slice_new0 (ModelItem);
           item->command = g_strndup (contents, end - contents);
-          item->icon = g_object_ref (G_OBJECT (model->command_icon));
-          item->icon_large = g_object_ref (G_OBJECT (model->command_icon_large));
+          item->icon = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon)));
+          item->icon_large = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon_large)));
           model->collect_items = g_slist_prepend (model->collect_items, item);
         }
 
@@ -1787,7 +1787,7 @@ xfce_appfinder_model_menu_changed_idle (gpointer data)
   /* always update the categories, because the pointers changed */
   xfce_appfinder_model_categories_changed (model);
 
-  g_slist_foreach (tmp, (GFunc) g_object_unref, NULL);
+  g_slist_foreach (tmp, (GFunc) (void (*)(void)) g_object_unref, NULL);
   g_slist_free (tmp);
 
   return FALSE;
@@ -2312,7 +2312,7 @@ xfce_appfinder_model_get_icon_for_command (XfceAppfinderModel *model,
               item->icon_large = xfce_appfinder_model_load_pixbuf (icon_name, XFCE_APPFINDER_ICON_SIZE_48);
             }
 
-          return g_object_ref (G_OBJECT (item->icon_large));
+          return GDK_PIXBUF (g_object_ref (G_OBJECT (item->icon_large)));
         }
     }
 
@@ -2372,8 +2372,8 @@ xfce_appfinder_model_icon_theme_changed (XfceAppfinderModel *model)
 
       if (item->item == NULL)
         {
-          item->icon = g_object_ref (G_OBJECT (model->command_icon));
-          item->icon_large = g_object_ref (G_OBJECT (model->command_icon_large));
+          item->icon = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon)));
+          item->icon_large = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon_large)));
         }
 
       if (item_changed)
diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index 2a8f6a9..1fa3610 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -1441,7 +1441,7 @@ xfce_appfinder_window_category_changed (GtkTreeSelection    *selection,
           if (category == NULL)
             window->filter_category = NULL;
           else
-            window->filter_category = g_object_ref (G_OBJECT (category));
+            window->filter_category = GARCON_MENU_DIRECTORY (g_object_ref (G_OBJECT (category)));
 
           APPFINDER_DEBUG ("refilter category");
 
diff --git a/src/main.c b/src/main.c
index d81d233..5be8284 100644
--- a/src/main.c
+++ b/src/main.c
@@ -320,7 +320,7 @@ main (gint argc, gchar **argv)
       windows = NULL;
 
       /* destroy all windows */
-      g_slist_foreach (windows_destroy, (GFunc) gtk_widget_destroy, NULL);
+      g_slist_foreach (windows_destroy, (GFunc) (void (*)(void)) gtk_widget_destroy, NULL);
       g_slist_free (windows_destroy);
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list