# HG changeset patch # User Eric Blake # Date 1313613300 21600 # Node ID 5b310380e54f6aaa5880b582ca21499010f3e194 # Parent 72c48e34ac0a78907120e0afe39e66087576cb22 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 diff --git a/ChangeLog b/ChangeLog --- 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 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -151,6 +151,8 @@ #endif +#if GNULIB_defined_O_NONBLOCK || \ + !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) fail: { int saved_errno = errno; @@ -161,4 +163,5 @@ errno = saved_errno; return -1; } +#endif }