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 568501 - Warning in AM_PATH_GLIB_2_0
Warning in AM_PATH_GLIB_2_0
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-01-21 01:05 UTC by Vincent Untz
Modified: 2011-06-26 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use unsigned int instead of int (1.13 KB, patch)
2009-01-21 01:09 UTC, Vincent Untz
none Details | Review

Description Vincent Untz 2009-01-21 01:05:22 UTC
Forwarding https://bugzilla.novell.com/show_bug.cgi?id=458587

========
The AM_PATH_GLIB_2_0 test doesn't compile with CFLAGS="-O2 -Wall -Wextra
-Werrror":

configure:20076: gcc -o conftest -O2 -Wall -Wextra -Werror
-I/usr/include/glib-2
.0 -I/usr/lib64/glib-2.0/include     conftest.c -Wl,--export-dynamic
-lgmodule-2
.0 -lglib-2.0    >&5
cc1: warnings being treated as errors
conftest.c: In function 'main':
conftest.c:67: error: comparison between signed and unsigned
conftest.c:68: error: comparison between signed and unsigned
conftest.c:68: error: comparison between signed and unsigned
conftest.c:69: error: comparison between signed and unsigned
conftest.c:69: error: comparison between signed and unsigned
conftest.c:69: error: comparison between signed and unsigned
configure:20079: $? = 1
configure: program exited with status 1
========

Using -Werror doesn't help the reporter. However, the warnings are right:

int major, minor, micro;

[...]

      if ((glib_major_version > major) ||
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))

And glib_*_version are defined like this:

GLIB_VAR const guint glib_major_version;
GLIB_VAR const guint glib_minor_version;
GLIB_VAR const guint glib_micro_version;
Comment 1 Vincent Untz 2009-01-21 01:09:38 UTC
Created attachment 126885 [details] [review]
Use unsigned int instead of int

configure in libgweather uses this macro and it still works with this patch, so I guess it's fine :-)
Comment 2 Patrick Welche 2011-06-23 16:32:10 UTC
It looks as though this was fixed with:

http://git.gnome.org/browse/glib/commit/?id=99d57b5ce952b7f43ff52b41362035bfa193eb5f
Comment 3 Vincent Untz 2011-06-26 10:22:03 UTC
Indeed.