[glib: 4/8] Fix unused variable and remove finalize vfunc in gio/tests/gdbus-example-proxy-subclass.c




commit af69d438ed2b3bf649993b9dca8c5978aa46c26a
Author: Loic Le Page <llepage fluendo com>
Date:   Wed Jan 19 19:03:16 2022 +0100

    Fix unused variable and remove finalize vfunc in gio/tests/gdbus-example-proxy-subclass.c
    
    G_GNUC_UNUSED does perfectly its job with gcc compiler but the warning
    still remains with msvc compiler.
    
    Once the unused variable removed, the finalize vfunc can be removed as
    it's doing the same job as the parent function.

 gio/tests/gdbus-example-proxy-subclass.c | 10 ----------
 1 file changed, 10 deletions(-)
---
diff --git a/gio/tests/gdbus-example-proxy-subclass.c b/gio/tests/gdbus-example-proxy-subclass.c
index ef2ed20376..05314ba2a0 100644
--- a/gio/tests/gdbus-example-proxy-subclass.c
+++ b/gio/tests/gdbus-example-proxy-subclass.c
@@ -110,15 +110,6 @@ static guint signals[LAST_SIGNAL] = {0};
 
 G_DEFINE_TYPE (AccountsUser, accounts_user, G_TYPE_DBUS_PROXY)
 
-static void
-accounts_user_finalize (GObject *object)
-{
-  G_GNUC_UNUSED AccountsUser *user = ACCOUNTS_USER (object);
-
-  if (G_OBJECT_CLASS (accounts_user_parent_class)->finalize != NULL)
-    G_OBJECT_CLASS (accounts_user_parent_class)->finalize (object);
-}
-
 static void
 accounts_user_init (AccountsUser *user)
 {
@@ -234,7 +225,6 @@ accounts_user_class_init (AccountsUserClass *klass)
 
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->get_property = accounts_user_get_property;
-  gobject_class->finalize = accounts_user_finalize;
 
   proxy_class = G_DBUS_PROXY_CLASS (klass);
   proxy_class->g_signal             = accounts_user_g_signal;


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