From a359e32eb5b7e6e24c0eb17e31a0711d47027d75 Mon Sep 17 00:00:00 2001 From: Martin Dorey Date: Mon, 26 Dec 2016 14:09:38 -0500 Subject: [PATCH] * job.c (child_execute_job): [SV 49938] Avoid spurious GCC warning. --- job.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/job.c b/job.c index 7d900ce5..81248971 100644 --- a/job.c +++ b/job.c @@ -2121,11 +2121,11 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp) int child_execute_job (struct output *out, int good_stdin, char **argv, char **envp) { - int r; - int pid; - int fdin = good_stdin ? FD_STDIN : get_bad_stdin (); + const int fdin = good_stdin ? FD_STDIN : get_bad_stdin (); int fdout = FD_STDOUT; int fderr = FD_STDERR; + int r; + int pid; /* Divert child output if we want to capture it. */ if (out && out->syncout)