test-futimens: avoid a warning from gcc -Wshadow
authorJim Meyering <meyering@redhat.com>
Sat, 24 Sep 2011 19:02:15 +0000 (21:02 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 24 Sep 2011 19:02:32 +0000 (21:02 +0200)
* tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/
to avoid a shadowing warning.

ChangeLog
tests/test-futimens.h

index 9def263..f154617 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-24  Jim Meyering  <meyering@redhat.com>
+
+       test-futimens: avoid a warning from gcc -Wshadow
+       * tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/
+       to avoid a shadowing warning.
+
 2011-09-24  Bruno Haible  <bruno@clisp.org>
 
        fdopen: Support for MSVC 9.
index 2cd7c01..9c9b1bb 100644 (file)
@@ -90,11 +90,11 @@ test_futimens (int (*func) (int, struct timespec const *),
     ASSERT (errno == EBADF);
   }
   {
-    int fd = dup (0);
-    ASSERT (0 <= fd);
-    ASSERT (close (fd) == 0);
+    int fd0 = dup (0);
+    ASSERT (0 <= fd0);
+    ASSERT (close (fd0) == 0);
     errno = 0;
-    ASSERT (func (fd, NULL) == -1);
+    ASSERT (func (fd0, NULL) == -1);
     ASSERT (errno == EBADF);
   }
   {