From 8ea6bf995cf561a525abc8f716e98c8a9b917496 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 17 Aug 2011 14:35:00 -0600 Subject: [PATCH] pipe2: silence compiler warning 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 --- ChangeLog | 5 +++++ lib/pipe2.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index aab48d772..770bdf77b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-17 Eric Blake + + pipe2: silence compiler warning + * lib/pipe2.c (pipe2): Hide label if it is not used. + 2011-08-15 Ben Pfaff relocatable-prog: fix link error diff --git a/lib/pipe2.c b/lib/pipe2.c index 12cac6e77..5420788d1 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 } -- 2.11.0