[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] test-perror2.c: avoid warning about unused variable
From: |
Jim Meyering |
Subject: |
[PATCH] test-perror2.c: avoid warning about unused variable |
Date: |
Tue, 24 May 2011 21:30:58 +0200 |
Trying out the latest from gnulib via coreutils,
I saw this new warning/failure:
...
Making check in gnulib-tests
...
test-perror2.c: In function 'main':
test-perror2.c:42:9: error: unused variable 'fp' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[5]: *** [test-perror2.o] Error 1
make[5]: *** Waiting for unfinished jobs....
I've just pushed this as obvious:
>From 734bedd126553e3619936f4fa84bf4854b7c40d6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 24 May 2011 21:28:46 +0200
Subject: [PATCH] test-perror2.c: avoid warning about unused variable
* tests/test-perror2.c (main): Remove declaration of unused "fp".
---
ChangeLog | 5 +++++
tests/test-perror2.c | 2 --
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f606d69..4ec6463 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-24 Jim Meyering <address@hidden>
+
+ test-perror2.c: avoid warning about unused variable
+ * tests/test-perror2.c (main): Remove declaration of unused "fp".
+
2011-05-24 Eric Blake <address@hidden>
perror: avoid spurious test failure on HP-UX
diff --git a/tests/test-perror2.c b/tests/test-perror2.c
index d8e0ec5..3aab640 100644
--- a/tests/test-perror2.c
+++ b/tests/test-perror2.c
@@ -37,8 +37,6 @@ static FILE *myerr;
int
main (void)
{
- FILE *fp;
-
/* We change fd 2 later, so save it in fd 10. */
if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
|| (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
--
1.7.5.2.585.gfbd48
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] test-perror2.c: avoid warning about unused variable,
Jim Meyering <=