diff options
author | Benjamin Otte <otte@redhat.com> | 2010-09-23 13:57:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-23 13:57:22 +0200 |
commit | 99d57b5ce952b7f43ff52b41362035bfa193eb5f (patch) | |
tree | 6eebbabcac8c15ceccb25b57c6d9a3daef463a2a /m4macros | |
parent | 24a706404ded0578b029b2fb65e6418bda84d32f (diff) |
glib-2.0.m4: Use unsigned variables for version numbers
When using signed, we get complaints from gcc about comparing signed to
unsigned with -Wsign-compare. And combined with -Werror in users' CFLAGS
it breaks configure runs.
Diffstat (limited to 'm4macros')
-rw-r--r-- | m4macros/glib-2.0.m4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/m4macros/glib-2.0.m4 b/m4macros/glib-2.0.m4 index a13eeeca2..d4cbe7306 100644 --- a/m4macros/glib-2.0.m4 +++ b/m4macros/glib-2.0.m4 @@ -91,14 +91,14 @@ dnl int main () { - int major, minor, micro; + unsigned int major, minor, micro; char *tmp_version; fclose (fopen ("conf.glibtest", "w")); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } @@ -137,9 +137,9 @@ main () } else { - printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", + printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); - printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", + printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); |