pipe2: silence compiler warning
authorEric Blake <eblake@redhat.com>
Wed, 17 Aug 2011 20:35:00 +0000 (14:35 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 17 Aug 2011 20:36:46 +0000 (14:36 -0600)
Detected when testing pipe2 in isolation on mingw.  The fail: label
needs either gnulib O_NONBLOCK emulation, or non-Windows systems.

* lib/pipe2.c (pipe2): Hide label if it is not used.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/pipe2.c

index aab48d7..770bdf7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-17  Eric Blake  <eblake@redhat.com>
+
+       pipe2: silence compiler warning
+       * lib/pipe2.c (pipe2): Hide label if it is not used.
+
 2011-08-15  Ben Pfaff  <blp@cs.stanford.edu>
 
        relocatable-prog: fix link error
index 12cac6e..5420788 100644 (file)
@@ -151,6 +151,8 @@ pipe2 (int fd[2], int flags)
 
 #endif
 
+#if GNULIB_defined_O_NONBLOCK || \
+  !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
  fail:
   {
     int saved_errno = errno;
@@ -161,4 +163,5 @@ pipe2 (int fd[2], int flags)
     errno = saved_errno;
     return -1;
   }
+#endif
 }