Use audioscrobbler as return value, this silences a compiler warning and makes the code consistent with the other constructor functions.
Integrated in Ario svn revision 758 with a small modification: --- plugins/audioscrobbler/ario-audioscrobbler.c (révision 757) +++ plugins/audioscrobbler/ario-audioscrobbler.c (copie de travail) @@ -243,7 +243,6 @@ GObjectConstructParam *construct_properties) { ARIO_LOG_FUNCTION_START - GObject *obj; ArioAudioscrobbler *audioscrobbler;
/* Invoke parent constructor. */ @@ -251,13 +250,11 @@ GObjectClass *parent_class; klass = ARIO_AUDIOSCROBBLER_CLASS (g_type_class_peek (ARIO_TYPE_AUDIOSCROBBLER)); parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass)); - obj = parent_class->constructor (type, - n_construct_properties, - construct_properties); + audioscrobbler = ARIO_AUDIOSCROBBLER (parent_class->constructor (type, + n_construct_properties, + construct_properties));
- audioscrobbler = ARIO_AUDIOSCROBBLER (obj); - - return obj; + return G_OBJECT (audioscrobbler); }
Thanks, Marc
Log in to post a comment.
Integrated in Ario svn revision 758 with a small modification:
--- plugins/audioscrobbler/ario-audioscrobbler.c (révision 757)
+++ plugins/audioscrobbler/ario-audioscrobbler.c (copie de travail)
@@ -243,7 +243,6 @@
GObjectConstructParam *construct_properties)
{
ARIO_LOG_FUNCTION_START
- GObject *obj;
ArioAudioscrobbler *audioscrobbler;
/* Invoke parent constructor. */
@@ -251,13 +250,11 @@
GObjectClass *parent_class;
klass = ARIO_AUDIOSCROBBLER_CLASS (g_type_class_peek (ARIO_TYPE_AUDIOSCROBBLER));
parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
- obj = parent_class->constructor (type,
- n_construct_properties,
- construct_properties);
+ audioscrobbler = ARIO_AUDIOSCROBBLER (parent_class->constructor (type,
+ n_construct_properties,
+ construct_properties));
- audioscrobbler = ARIO_AUDIOSCROBBLER (obj);
-
- return obj;
+ return G_OBJECT (audioscrobbler);
}
Thanks,
Marc