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 659646 - gdbus-codegen produce code that warnings at build
gdbus-codegen produce code that warnings at build
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-09-20 21:18 UTC by Xavier Claessens
Modified: 2011-09-21 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbus-codegen: Fix build errors in generated code (5.18 KB, patch)
2011-09-20 21:47 UTC, Xavier Claessens
accepted-commit_now Details | Review

Description Xavier Claessens 2011-09-20 21:18:47 UTC
Here is an example of code produced:

static void
tp_gdbus_connection_object_proxy_set_property (GObject      *_object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  G_OBJECT_WARN_INVALID_PROPERTY_ID (_object, prop_id, pspec);
}

Which makes that error (warning actually) at build:

error: declaration of '_object' shadows a parameter [-Werror=shadow]

G_OBJECT_WARN_INVALID_PROPERTY_ID expands to code that declare _object too... so must be renamed in code generated. Why is there an underscore anyway?
Comment 1 Xavier Claessens 2011-09-20 21:45:01 UTC
Also when using --generate-c-code foo/bar to save the .c/.h files to a subdir, the header guards fails to build:

#ifndef ___GEN/TP_GDBUS_CONNECTION_H__
#define ___GEN/TP_GDBUS_CONNECTION_H__
Comment 2 Xavier Claessens 2011-09-20 21:47:29 UTC
Created attachment 197114 [details] [review]
gdbus-codegen: Fix build errors in generated code
Comment 3 David Zeuthen (not reading bugmail) 2011-09-20 21:52:05 UTC
Comment on attachment 197114 [details] [review]
gdbus-codegen: Fix build errors in generated code

Looks good to me. Please commit to master.
Comment 4 David Zeuthen (not reading bugmail) 2011-09-20 21:53:44 UTC
Ryan: can we put this patch on glib-2-30 as well? Thanks!
Comment 5 Xavier Claessens 2011-09-21 08:48:21 UTC
Ok, merged in master, just cherry-pick 70515ffe928fa4dc2cadeddfa68a67a7cd727cfe if it is accepted 2.30
Comment 6 David Zeuthen (not reading bugmail) 2011-09-21 11:23:23 UTC
I've cherry-picked this fix and pushed (along with some gdbus-codegen(1) man page fixes) - we really don't want to release 2.30 without this fix. Thanks.