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.
This commit is contained in:
Loic Le Page 2022-01-19 19:03:16 +01:00 committed by Philip Withnall
parent 4e3f704d49
commit af69d438ed

View File

@ -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;