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 668497 - Squash a few warnings
Squash a few warnings
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-23 13:15 UTC by Will Thompson
Modified: 2012-01-24 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix a few set-but-not-used warnings. (2.93 KB, patch)
2012-01-23 13:15 UTC, Will Thompson
committed Details | Review
g_instance_init: cast to PyGObject * as needed (1018 bytes, patch)
2012-01-23 13:15 UTC, Will Thompson
committed Details | Review
Cairo: add missing braces around array-of-struct definition (813 bytes, patch)
2012-01-23 13:15 UTC, Will Thompson
committed Details | Review

Description Will Thompson 2012-01-23 13:15:47 UTC
Building pygobject with GCC 4.6.2 produces a small menagerie of warnings. These
patches squash a few of the more obvious ones.
Comment 1 Will Thompson 2012-01-23 13:15:48 UTC
Created attachment 205875 [details] [review]
Fix a few set-but-not-used warnings.

In a couple of cases, the variable in question was set to a value
spelled out again later in the function.

The 'sequence_cache' variable is re-declared five lines below.

The return value of 'read' was previously completely ignored. The
'gssize ret' variable was in fact added to squash an unused-result
warning.
Comment 2 Will Thompson 2012-01-23 13:15:51 UTC
Created attachment 205876 [details] [review]
g_instance_init: cast to PyGObject * as needed

This squashes a compiler warning.
Comment 3 Will Thompson 2012-01-23 13:15:53 UTC
Created attachment 205877 [details] [review]
Cairo: add missing braces around array-of-struct definition

This triggered a -Wmissing-braces warning.
Comment 4 Tomeu Vizoso 2012-01-24 15:30:31 UTC
Attachment 205875 [details] pushed as a8408cf - Fix a few set-but-not-used warnings.
Attachment 205876 [details] pushed as db24865 - g_instance_init: cast to PyGObject * as needed
Attachment 205877 [details] pushed as e37ee78 - Cairo: add missing braces around array-of-struct definition