From f62412f235c387d46e192244db43ce62d9a9e7be Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 17 Jul 2006 19:30:30 +0000 Subject: GCC 4.1 fixes. * cygheap.h (cygheap_user): Remove unneeded class names from function declaration. * fhandler.h (fhandler_base): Ditto. (fhandler_dev_floppy): Ditto. (fhandler_console): Ditto. * wininfo.h (wininfo): Ditto. * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos and initialization. * fhandler_fifo.cc (fhandler_fifo::open): Ditto. * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto. * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto. * mmap.cc (mmap64): Ditto. * pipe.cc (fhandler_pipe::open): Ditto. * spawn.cc (spawn_guts): Ditto. * sec_helper.cc: Fix some comments. (get_null_sd): Move file-scope static to only function where it is used. --- winsup/cygwin/pipe.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/pipe.cc') diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 183bd18de..a6171f2f9 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -46,6 +46,7 @@ fhandler_pipe::open (int flags, mode_t mode) fhandler_pipe *fh = NULL; size_t size; int pid, rwflags = (flags & O_ACCMODE); + bool inh; sscanf (get_name (), "/proc/%d/fd/pipe:[%d]", &pid, (int *) &pipe_hdl); if (pid == myself->pid) @@ -93,7 +94,7 @@ fhandler_pipe::open (int flags, mode_t mode) set_errno (EACCES); goto out; } - bool inh = !(flags & O_NOINHERIT); + inh = !(flags & O_NOINHERIT); if (!DuplicateHandle (proc, pipe_hdl, hMainProc, &nio_hdl, 0, inh, DUPLICATE_SAME_ACCESS)) { -- cgit v1.2.3