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 584849 - Kill warnings (uninitialized variables, strict aliasing)
Kill warnings (uninitialized variables, strict aliasing)
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2009-06-04 17:32 UTC by C. Scott Ananian
Modified: 2009-06-04 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Kill-a-warning-about-uninitialized-filename-if-argc-is-0.patch (905 bytes, patch)
2009-06-04 17:33 UTC, C. Scott Ananian
accepted-commit_now Details | Review
Fix-strict-aliasing-errors.-Type-punned-pointer-warnings.patch (3.27 KB, patch)
2009-06-04 17:33 UTC, C. Scott Ananian
accepted-commit_now Details | Review

Description C. Scott Ananian 2009-06-04 17:32:08 UTC
The attached two patches fix some warnings in gjs.  The first kills a warning about "filename" being uninitialized in main() if argc == 0 -- which probably won't ever happen (outside of an embedded environment, perhaps) but is still worth fixing to quiet the warning.  The second patch fixes "type punned pointer" warnings from gjs caused by failure to adhere to C99 strict aliasing rules (see http://www.cellperformance.com/mike_acton/2006/06/understanding_strict_aliasing.html)
Comment 1 C. Scott Ananian 2009-06-04 17:33:32 UTC
Created attachment 135962 [details] [review]
Kill-a-warning-about-uninitialized-filename-if-argc-is-0.patch
Comment 2 C. Scott Ananian 2009-06-04 17:33:56 UTC
Created attachment 135963 [details] [review]
Fix-strict-aliasing-errors.-Type-punned-pointer-warnings.patch
Comment 3 Johan Bilien 2009-06-04 17:41:10 UTC
These look fine to me
Comment 4 C. Scott Ananian 2009-06-04 18:31:32 UTC
Pushed, closed.