[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] poll: remove declarations of unused variables
From: |
Jim Meyering |
Subject: |
Re: [PATCH] poll: remove declarations of unused variables |
Date: |
Fri, 16 Jan 2009 09:38:34 +0100 |
Paolo Bonzini <address@hidden> wrote:
> Jim Meyering wrote:
>> Ok to apply this?
>
> Sure.
I pushed Dan's change:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=03ba7406f5e0
>> /* 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
>
> Ok too for this particular case, of course not for -Wunused.
Here's what I've pushed:
>From 0f8cbbe1fc5c09c454a14ce29511d79cc2df0808 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 16 Jan 2009 09:36:21 +0100
Subject: [PATCH] poll: suppress a warning
* lib/poll.c: Use #pragma GCC diagnostic ignored "-Wtype-limits"
to ignore "...unsigned expression < 0 is always false" warnings.
---
ChangeLog | 6 ++++++
lib/poll.c | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f07972b..9683602 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-16 Jim Meyering <address@hidden>
+
+ 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 <address@hidden>
poll: remove declarations of unused variables
diff --git a/lib/poll.c b/lib/poll.c
index bc7721c..ed76098 100644
--- 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>
--
1.6.1.249.g455e