URL:
  <http://savannah.gnu.org/bugs/?49938>

                 Summary: fdin might be (but isn't?) clobbered by vfork
                 Project: make
            Submitted by: mdorey
            Submitted on: Mon 26 Dec 2016 10:42:49 AM PST
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

I imagine it's gcc-4.7 giving me this:

job.c: In function ‘child_execute_job’:
job.c:2126:7: error: variable ‘fdin’ might be clobbered by ‘longjmp’
or ‘vfork’ [-Werror=clobbered]

... which goes away with this harmless-looking change:

martind@swiftboat:~/download/make-git$ git diff
diff --git a/job.c b/job.c
index 7d900ce..1b28324 100644
--- a/job.c
+++ b/job.c
@@ -2123,7 +2123,7 @@ 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;
 





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49938>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to