GNOME Bugzilla – Bug 568501
Warning in AM_PATH_GLIB_2_0
Last modified: 2011-06-26 10:22:03 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;
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 :-)
It looks as though this was fixed with: http://git.gnome.org/browse/glib/commit/?id=99d57b5ce952b7f43ff52b41362035bfa193eb5f
Indeed.