From 93843ccd08a8d4dff64c5fb52701e150b35c959d Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 28 Apr 2013 01:41:47 -0400 Subject: Fix a few compiler warnings found by Eli. --- job.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'job.c') diff --git a/job.c b/job.c index 941cf21..07d70c7 100644 --- 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 = _(""); 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') -- cgit v1.2.3