varargs in panic()
This commit is contained in:
parent
d75369dd40
commit
6ea0fa77db
|
@ -106,13 +106,22 @@ rep_loc(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VARARGS1 */
|
/* VARARGS */
|
||||||
panic(fmt, args)
|
panic(va_alist) /* fmt, args */
|
||||||
char *fmt;
|
va_dcl
|
||||||
{
|
{
|
||||||
fprint(ERROUT, "PANIC, lint, pass2: line %d: ", LineNr);
|
va_list ap;
|
||||||
doprnt(ERROUT, fmt, &args);
|
|
||||||
fprint(ERROUT, "\n");
|
va_start(ap);
|
||||||
|
{
|
||||||
|
char *fmt = va_arg(ap, char *);
|
||||||
|
|
||||||
|
fprint(ERROUT, "PANIC, lint, pass2: line %d: ", LineNr);
|
||||||
|
doprnt(ERROUT, fmt, ap);
|
||||||
|
fprint(ERROUT, "\n");
|
||||||
|
}
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue