GNOME Bugzilla – Bug 659646
gdbus-codegen produce code that warnings at build
Last modified: 2011-09-21 11:23:23 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?
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__
Created attachment 197114 [details] [review] gdbus-codegen: Fix build errors in generated code
Comment on attachment 197114 [details] [review] gdbus-codegen: Fix build errors in generated code Looks good to me. Please commit to master.
Ryan: can we put this patch on glib-2-30 as well? Thanks!
Ok, merged in master, just cherry-pick 70515ffe928fa4dc2cadeddfa68a67a7cd727cfe if it is accepted 2.30
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.