# HG changeset patch # User Bruno Haible # Date 1287346552 -7200 # Node ID 4b3de439fe4009db22d96da964a304af07646ed0 # Parent 86abc8c3b7d9220d5798b4e16b458efb5771fc11 nl_langinfo tests: Silence some warnings. * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings. Reported by Jim Meyering. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-17 Bruno Haible + + nl_langinfo tests: Silence some warnings. + * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings. + Reported by Jim Meyering. + 2010-10-17 Bruno Haible Make use of GCC's attribute __alloc_size__. diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c --- a/tests/test-nl_langinfo.c +++ b/tests/test-nl_langinfo.c @@ -1,5 +1,5 @@ /* Test of nl_langinfo replacement. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,6 +30,13 @@ #include "c-strcase.h" #include "macros.h" +/* For GCC >= 4.2, silence the warnings + "comparison of unsigned expression >= 0 is always true" + in this file. */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + int main (int argc, char *argv[]) {