X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-nl_langinfo.c;h=d31e54f9bd8462f8e43cfabf3657c89eee5be0ea;hb=906943bafa97f097349474b393980d7e84855036;hp=ec89b3f7530ffdae0a8fd186b2f92b1435485ef6;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c index ec89b3f75..d31e54f9b 100644 --- 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-2013 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 @@ SIGNATURE_CHECK (nl_langinfo, char *, (nl_item)); #include "c-strcase.h" #include "macros.h" +/* For GCC >= 4.3, silence the warnings + "comparison of unsigned expression >= 0 is always true" + in this file. */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + int main (int argc, char *argv[]) { @@ -105,7 +112,11 @@ main (int argc, char *argv[]) /* nl_langinfo items of the LC_MONETARY category */ { const char *currency = nl_langinfo (CRNCYSTR); - ASSERT (strlen (currency) >= (pass > 0 ? 1 : 0)); + ASSERT (strlen (currency) >= 0); +#if !defined __NetBSD__ + if (pass > 0) + ASSERT (strlen (currency) >= 1); +#endif } /* nl_langinfo items of the LC_MESSAGES category */ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0);