[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] pipe2: silence compiler warning
From: |
Eric Blake |
Subject: |
[PATCH] pipe2: silence compiler warning |
Date: |
Wed, 17 Aug 2011 14:36:25 -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 <address@hidden>
---
ChangeLog | 3 +++
lib/pipe2.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 41776a9..08d58bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-08-17 Eric Blake <address@hidden>
+ pipe2: silence compiler warning
+ * lib/pipe2.c (pipe2): Hide label if it is not used.
+
getcwd: fix compilation on mingw64
* lib/unistd.in.h (includes) [mingw]: Include <direct.h> for
getcwd.
diff --git a/lib/pipe2.c b/lib/pipe2.c
index 12cac6e..5420788 100644
--- a/lib/pipe2.c
+++ b/lib/pipe2.c
@@ -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
}
--
1.7.4.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] pipe2: silence compiler warning,
Eric Blake <=