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 693697 - gdbus-codegen generates code with redundant declarations
gdbus-codegen generates code with redundant declarations
Status: RESOLVED DUPLICATE of bug 696108
Product: glib
Classification: Platform
Component: general
2.34.x
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-02-13 07:56 UTC by Milan Crha
Modified: 2018-02-16 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2013-02-13 07:56:56 UTC
I've installed glib2-devel-2.34.2-1.fc18.x86_64 and the code evolution-data-server generates with help of gdbus-codegen produces compiler warnings like this one:

   e-dbus-source.c:329:1: warning: redundant redeclaration of
   'e_dbus_source_default_init' [-Wredundant-decls]
   e-dbus-source.c:282:1: note: previous definition of
   'e_dbus_source_default_init' was here

The only issue with the generated code is that the
   typedef EDBusSourceIface EDBusSourceInterface;
   G_DEFINE_INTERFACE (EDBusSource, e_dbus_source, G_TYPE_OBJECT);

should be added *before*
   static void
   e_dbus_source_default_init (EDBusSourceIface *iface)
   {
    ...
   }

while it's currently after.

The warnings are easy to fix on the gdbus-codegen side, and are rather disturbing when one tries to keep code compiler-warning-free (not that eds is currently, but that's another thing). The eds currently rebuilds the code whenever compiled (no idea why it does that), thus the only possible fix is in the gdbus-codegen itself.
Comment 1 Philip Withnall 2018-02-16 12:56:20 UTC
I think this was fixed as bug #696108. Specifically, commit 31c00c1fbeba76e046ade5792b9b3b3638d9f11c (available in GLib 2.37.0).

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