GNOME Bugzilla – Bug 341472
G_IMPLEMENT_INTERFACE yields a warning when compiling with -W option
Last modified: 2006-05-11 22:16:44 UTC
G_IMPLEMENT_INTERFACE doesn't initialize all GInterfaceInfo fields, so gcc emits a warning about it when using -W option. Index: gobject/gtype.h =================================================================== RCS file: /cvs/gnome/glib/gobject/gtype.h,v retrieving revision 1.66 diff -u -p -r1.66 gtype.h --- gobject/gtype.h 2 May 2006 13:00:52 -0000 1.66 +++ gobject/gtype.h 11 May 2006 21:44:49 -0000 @@ -349,7 +349,9 @@ gpointer g_type_instance_get_private */ #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \ static const GInterfaceInfo g_implement_interface_info = { \ - (GInterfaceInitFunc) iface_init \ + (GInterfaceInitFunc) iface_init, \ + NULL, \ + NULL \ }; \ g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ }
*** This bug has been marked as a duplicate of 337129 ***