diff options
author | Paul Smith <psmith@gnu.org> | 2013-04-28 01:41:47 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-04-28 01:41:47 -0400 |
commit | 93843ccd08a8d4dff64c5fb52701e150b35c959d (patch) | |
tree | bb03dbdef6ac1a75d4e4160d653b5608d7ab52d8 /job.c | |
parent | 7f01830927969a8386050617385e59070fe9f34b (diff) | |
download | gunmake-93843ccd08a8d4dff64c5fb52701e150b35c959d.tar.gz |
Fix a few compiler warnings found by Eli.
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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') |