summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-04-28 01:41:47 -0400
committerPaul Smith <psmith@gnu.org>2013-04-28 01:41:47 -0400
commit93843ccd08a8d4dff64c5fb52701e150b35c959d (patch)
treebb03dbdef6ac1a75d4e4160d653b5608d7ab52d8 /job.c
parent7f01830927969a8386050617385e59070fe9f34b (diff)
downloadgunmake-93843ccd08a8d4dff64c5fb52701e150b35c959d.tar.gz
Fix a few compiler warnings found by Eli.
Diffstat (limited to 'job.c')
-rw-r--r--job.c7
1 files changed, 4 insertions, 3 deletions
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 = _("<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')