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 689377 - Fix a compiler warning in GDBus
Fix a compiler warning in GDBus
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-11-30 20:26 UTC by Colin Walters
Modified: 2012-12-05 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gobject: Use local variable names in macros less likely to clash (1.85 KB, patch)
2012-11-30 20:26 UTC, Colin Walters
committed Details | Review
gdbusobjectskeleton: Fix compiler warnings (1.18 KB, patch)
2012-11-30 20:26 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2012-11-30 20:26:00 UTC
...in two ways.
Comment 1 Colin Walters 2012-11-30 20:26:04 UTC
Created attachment 230339 [details] [review]
gobject: Use local variable names in macros less likely to clash

At least GDBus had code that had "_object" as a parameter to one of
its functions, but this clashes with the GObject macro
G_OBJECT_WARN_INVALID_PROPERTY_ID() which created a local "_object".

Since many of us cargo cult around copies of objects, let's be
defensive here and use local variable names less likely to clash with
application code.
Comment 2 Colin Walters 2012-11-30 20:26:07 UTC
Created attachment 230340 [details] [review]
gdbusobjectskeleton: Fix compiler warnings

The G_OBJECT_WARN_INVALID_PROPERTY_ID() macro uses a local variable
named "_object"; work around this by using "object" as the variable we
pass in.
Comment 3 Dan Winship 2012-12-04 22:08:11 UTC
Comment on attachment 230339 [details] [review]
gobject: Use local variable names in macros less likely to clash

sure
Comment 4 Dan Winship 2012-12-04 22:08:45 UTC
Comment on attachment 230340 [details] [review]
gdbusobjectskeleton: Fix compiler warnings

sure, also fine
Comment 5 Colin Walters 2012-12-05 18:31:05 UTC
Attachment 230339 [details] pushed as 33de093 - gobject: Use local variable names in macros less likely to clash
Attachment 230340 [details] pushed as 1e74e46 - gdbusobjectskeleton: Fix compiler warnings