inttostr.c: suppress a warning
authorJim Meyering <meyering@redhat.com>
Sun, 30 Nov 2008 16:36:15 +0000 (17:36 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 13 Jan 2009 07:21:53 +0000 (08:21 +0100)
* lib/inttostr.c: Use #pragma GCC diagnostic ignored "-Wtype-limits"
to ignore "...unsigned expression < 0 is always false" warnings.

lib/inttostr.c

index 4ba71f5..ed6a693 100644 (file)
@@ -1,6 +1,6 @@
 /* inttostr.c -- convert integers to printable strings
 
-   Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2008 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
 
 /* Written by Paul Eggert */
 
+/* Tell gcc not to warn about the (i < 0) test, below.  */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
 #include <config.h>
 
 #include "inttostr.h"