changeset 11020:4494a99c424d

poll: suppress a warning * lib/poll.c: Use #pragma GCC diagnostic ignored "-Wtype-limits" to ignore "...unsigned expression < 0 is always false" warnings.
author Jim Meyering <meyering@redhat.com>
date Fri, 16 Jan 2009 09:36:21 +0100
parents 7b796798b7bb
children 9118fd8fdd2f
files ChangeLog lib/poll.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-16  Jim Meyering  <meyering@redhat.com>
+
+	poll: suppress a warning
+	* lib/poll.c: Use #pragma GCC diagnostic ignored "-Wtype-limits"
+	to ignore "...unsigned expression < 0 is always false" warnings.
+
 2009-01-16  Daniel P. Berrange  <berrange@redhat.com>
 
 	poll: remove declarations of unused variables
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -19,6 +19,11 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+/* Tell gcc not to warn about the (nfd < 0) tests, below.  */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
 #include <config.h>
 #include <alloca.h>