]> Savannah Git Hosting - gnulib.git/commitdiff
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 9def2635ec9c0f8bc608c09c2785deaa35064e2a..f154617a4ce124d1bf5eb0d0468bc63d59d2de8b 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 2cd7c014bf3ac231b670297150ff1539ad65b802..9c9b1bb283541c7b91d413e085af274ddc6e0267 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);
   }
   {