]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Fix a few compiler warnings found by Eli.
authorPaul Smith <psmith@gnu.org>
Sun, 28 Apr 2013 05:41:47 +0000 (01:41 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 28 Apr 2013 05:41:47 +0000 (01:41 -0400)
implicit.c
job.c

index fce9c89794fa27b4e2ba59ea4b4aaccf15d69451..d41467681d369aa5ea786321760b5af70f8cedfb 100644 (file)
@@ -221,9 +221,6 @@ pattern_search (struct file *file, int archive,
     = xmalloc (max_pattern_deps * sizeof (struct patdeps));
   struct patdeps *pat = deplist;
 
-  /* All the prerequisites actually found for a rule, after expansion.  */
-  struct dep *deps;
-
   /* Names of possible dependencies are constructed in this buffer.  */
   char *depname = alloca (namelen + max_pattern_dep_length);
 
@@ -800,10 +797,7 @@ pattern_search (struct file *file, int archive,
             /* This pattern rule does apply.  Stop looking for one.  */
             break;
 
-          /* This pattern rule does not apply. If some of its dependencies
-             succeeded, free the data structure describing them.  */
-          /* free_idep_chain (deps); */
-          deps = 0;
+          /* This pattern rule does not apply.  Keep looking.  */
         }
 
       /* If we found an applicable rule without intermediate files, don't try
diff --git a/job.c b/job.c
index 941cf21a9212159ab53ed6fb0a90802ce6938040..07d70c737032b799be149eaf4f43f29f26a90455 100644 (file)
--- a/job.c
+++ b/job.c
@@ -2199,14 +2199,15 @@ new_job (struct file *file)
   if (trace_flag)
     {
       char *newer = allocated_variable_expand_for_file ("$?", c->file);
-      char *nm;
+      const char *nm;
 
       if (! cmds->fileinfo.filenm)
         nm = _("<builtin>");
       else
         {
-          nm = alloca (strlen (cmds->fileinfo.filenm) + 1 + 11 + 1);
-          sprintf (nm, "%s:%lu", cmds->fileinfo.filenm, cmds->fileinfo.lineno);
+          char *n = alloca (strlen (cmds->fileinfo.filenm) + 1 + 11 + 1);
+          sprintf (n, "%s:%lu", cmds->fileinfo.filenm, cmds->fileinfo.lineno);
+          nm = n;
         }
 
       if (newer[0] == '\0')