Fix a bug where ::warning() was called with a va_list argument instead of an

actual vararg list.
Also cleaned up the format for warnings. (Previously some would start with
"warning - warning - Warning:" which was a bit redundant)
This commit is contained in:
Frits van Bommel
2009-03-18 15:03:17 +01:00
parent d9f9da4521
commit 434cb74980
7 changed files with 28 additions and 18 deletions

View File

@@ -71,13 +71,11 @@ namespace Logger
{
return _enabled;
}
void attention(const Loc& loc, const char* fmt,...)
void attention(Loc loc, const char* fmt,...)
{
printf("Warning: %s: ", loc.toChars());
va_list va;
va_start(va,fmt);
vprintf(fmt,va);
vwarning(loc,fmt,va);
va_end(va);
printf("\n");
}
}