nl_langinfo tests: Silence some warnings.
authorBruno Haible <bruno@clisp.org>
Sun, 17 Oct 2010 20:15:52 +0000 (22:15 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 17 Oct 2010 20:15:52 +0000 (22:15 +0200)
* tests/test-nl_langinfo.c: Silence -Wtype-limits warnings.
Reported by Jim Meyering.

ChangeLog
tests/test-nl_langinfo.c

index ae5d49ab3b9cc0d579dd8f1ad68505b4d1e27287..c59d85f5feb622c308295d4d53e6fc6ab9385098 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-17  Bruno Haible  <bruno@clisp.org>
+
+       nl_langinfo tests: Silence some warnings.
+       * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings.
+       Reported by Jim Meyering.
+
 2010-10-17  Bruno Haible  <bruno@clisp.org>
 
        Make use of GCC's attribute __alloc_size__.
index ec89b3f7530ffdae0a8fd186b2f92b1435485ef6..27b1ed668ca97f4931ca1f68b02fc7701ad699e0 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of nl_langinfo replacement.
-   Copyright (C) 20092010 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 @@ SIGNATURE_CHECK (nl_langinfo, char *, (nl_item));
 #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[])
 {