[gnome-software] shell: Fix g_clear_pointer compiler warnings



commit da170e6de6d91aeb8f98bd38bf0f18ed5b644dbd
Author: Kalev Lember <klember redhat com>
Date:   Wed Sep 26 15:46:59 2018 +0200

    shell: Fix g_clear_pointer compiler warnings
    
    ../src/gs-shell.c: In function ‘gs_shell_dispose’:
    ../src/gs-shell.c:2318:33: warning: function called through a non-compatible type
      g_clear_pointer (&priv->pages, (GDestroyNotify) g_hash_table_unref);
    /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
           (destroy) (_ptr);                                                        \
            ^~~~~~~
    ../src/gs-shell.c:2320:41: warning: function called through a non-compatible type
      g_clear_pointer (&priv->modal_dialogs, (GDestroyNotify) g_ptr_array_unref);
    /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
           (destroy) (_ptr);                                                        \
            ^~~~~~~

 src/gs-shell.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 27f2018e..b5cceede 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2313,9 +2313,9 @@ gs_shell_dispose (GObject *object)
        g_clear_object (&priv->header_start_widget);
        g_clear_object (&priv->header_end_widget);
        g_clear_object (&priv->page_last);
-       g_clear_pointer (&priv->pages, (GDestroyNotify) g_hash_table_unref);
-       g_clear_pointer (&priv->events_info_uri, (GDestroyNotify) g_free);
-       g_clear_pointer (&priv->modal_dialogs, (GDestroyNotify) g_ptr_array_unref);
+       g_clear_pointer (&priv->pages, g_hash_table_unref);
+       g_clear_pointer (&priv->events_info_uri, g_free);
+       g_clear_pointer (&priv->modal_dialogs, g_ptr_array_unref);
 
        G_OBJECT_CLASS (gs_shell_parent_class)->dispose (object);
 }


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