[recipes] Fix a few more compiler warnings



commit c0304675f63a33737b24fdf37e06c6b154a91a31
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Sun Mar 22 15:19:25 2020 -0700

    Fix a few more compiler warnings
    
    Use g_ptr_array_unref() where appropriate, and cast to GtkTreeModel
    since GtkListStore implements that.

 src/gr-cooking-view.c           | 2 +-
 src/gr-edit-page.c              | 2 +-
 src/gr-image-viewer.c           | 2 +-
 src/gr-ingredients-viewer-row.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gr-cooking-view.c b/src/gr-cooking-view.c
index ed1ca6b..709a1b6 100644
--- a/src/gr-cooking-view.c
+++ b/src/gr-cooking-view.c
@@ -663,7 +663,7 @@ gr_cooking_view_stop (GrCookingView *view,
                 container_remove_all (GTK_CONTAINER (view->timer_box));
 
         g_clear_pointer (&view->instructions, g_free);
-        g_clear_pointer (&view->images, g_array_unref);
+        g_clear_pointer (&view->images, g_ptr_array_unref);
         g_ptr_array_set_size (view->steps, 0);
 
         if (stop_timers) {
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index 856680a..a025623 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -946,7 +946,7 @@ get_units_model (GrEditPage *page)
                                                    -1);
         }
 
-        return g_object_ref (store);
+        return GTK_TREE_MODEL (g_object_ref (store));
 }
 
 static gboolean
diff --git a/src/gr-image-viewer.c b/src/gr-image-viewer.c
index 34355df..aeedeb2 100644
--- a/src/gr-image-viewer.c
+++ b/src/gr-image-viewer.c
@@ -127,7 +127,7 @@ gr_image_viewer_finalize (GObject *object)
         g_clear_pointer (&viewer->additions, g_ptr_array_unref);
         g_clear_pointer (&viewer->removals, g_ptr_array_unref);
 
-        g_clear_pointer (&viewer->images, g_array_unref);
+        g_clear_pointer (&viewer->images, g_ptr_array_unref);
         remove_hide_timeout (viewer);
         g_clear_object (&viewer->gesture);
 
diff --git a/src/gr-ingredients-viewer-row.c b/src/gr-ingredients-viewer-row.c
index 2723053..bea7376 100644
--- a/src/gr-ingredients-viewer-row.c
+++ b/src/gr-ingredients-viewer-row.c
@@ -764,7 +764,7 @@ get_units_model (GrIngredientsViewerRow *row)
                 }
         }
 
-        return g_object_ref (store);
+        return GTK_TREE_MODEL (g_object_ref (store));
 }
 
 static void


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