After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 341472 - G_IMPLEMENT_INTERFACE yields a warning when compiling with -W option
G_IMPLEMENT_INTERFACE yields a warning when compiling with -W option
Status: RESOLVED DUPLICATE of bug 337129
Product: glib
Classification: Platform
Component: gobject
2.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2006-05-11 21:47 UTC by Yevgen Muntyan
Modified: 2006-05-11 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Yevgen Muntyan 2006-05-11 21:47:32 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); \
 }
Comment 1 Behdad Esfahbod 2006-05-11 22:16:44 UTC

*** This bug has been marked as a duplicate of 337129 ***