From afacaa1b181c04800688face1880fbfd410a9cee Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 23 Jul 2013 03:11:40 +0200 Subject: [PATCH] src/callproc.c (child_setup): Silence compiler warnings. --- src/ChangeLog | 5 +++++ src/callproc.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1ad809dffab..1423b9d366e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-07-23 Juanma Barranquero + + * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid + here to silence compiler warnings. + 2013-07-22 Paul Eggert * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame diff --git a/src/callproc.c b/src/callproc.c index 282a08056f8..91f29bd589b 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1193,13 +1193,14 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, { char **env; char *pwd_var; - int exec_errno; #ifdef WINDOWSNT int cpid; HANDLE handles[3]; -#endif /* WINDOWSNT */ +#else + int exec_errno; pid_t pid = getpid (); +#endif /* WINDOWSNT */ /* Note that use of alloca is always safe here. It's obvious for systems that do not have true vfork or that have true (stack) alloca. -- 2.39.2