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 321229 - fixes for GCC4.1 warnings
fixes for GCC4.1 warnings
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-11-11 13:56 UTC by Stanislav Brabec
Modified: 2011-02-18 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib-atomic.patch (908 bytes, patch)
2005-11-11 13:57 UTC, Stanislav Brabec
none Details | Review
glib-strict-aliasing.patch (464 bytes, patch)
2005-11-11 13:58 UTC, Stanislav Brabec
none Details | Review
glib-sentinel.patch (422 bytes, patch)
2005-11-11 13:59 UTC, Stanislav Brabec
none Details | Review

Description Stanislav Brabec 2005-11-11 13:56:43 UTC
Distribution/Version: SuSE Linux Edge

Attached patches fixes some gcc-4.1 warnings.

Another patch can be found in bug 316221

Applied to version glib-2.8.3
Comment 1 Stanislav Brabec 2005-11-11 13:57:42 UTC
Created attachment 54637 [details] [review]
glib-atomic.patch

Fixes strict aliasing for gatomic.c. Patch from Andreas Schwab.
Comment 2 Stanislav Brabec 2005-11-11 13:58:51 UTC
Created attachment 54638 [details] [review]
glib-strict-aliasing.patch

Fixes strict aliasing warnings in libmoduletestplugin_a.c.
Comment 3 Stanislav Brabec 2005-11-11 13:59:31 UTC
Created attachment 54639 [details] [review]
glib-sentinel.patch

Adds sentinel check to g_object_new.
Comment 4 Matthias Clasen 2005-11-11 16:19:46 UTC
The last patch doesn't work, since it is common to write
g_object_new (NULL) instead of g_object_new (NULL, NULL)

This is an unfortunate restriction of the sentinel attribute in gcc
which prevents its use in many places in glib and gtk.
Comment 5 Behdad Esfahbod 2005-12-04 07:31:46 UTC
Well, g_object_new(NULL) is wrong, since the function takes at least two
arguments.  I think g_object_new should have been defined without the second
argument in the first place, right?
Comment 6 Matthias Clasen 2005-12-05 16:07:00 UTC
Committed, except for the sentinel patch.