Mercurial > projects > ldc
comparison dmd/statement.c @ 1124:e7f0c2b48047
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)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 18 Mar 2009 15:03:17 +0100 |
parents | b30fe7e1dbb9 |
children | eeb8b95ea92e |
comparison
equal
deleted
inserted
replaced
1123:165a920f4e88 | 1124:e7f0c2b48047 |
---|---|
98 | 98 |
99 void Statement::warning(const char *format, ...) | 99 void Statement::warning(const char *format, ...) |
100 { | 100 { |
101 if (global.params.warnings && !global.gag) | 101 if (global.params.warnings && !global.gag) |
102 { | 102 { |
103 fprintf(stdmsg, "warning - "); | |
104 va_list ap; | 103 va_list ap; |
105 va_start(ap, format); | 104 va_start(ap, format); |
106 ::verror(loc, format, ap); | 105 ::vwarning(loc, format, ap); |
107 va_end( ap ); | 106 va_end( ap ); |
108 } | 107 } |
109 } | 108 } |
110 | 109 |
111 int Statement::hasBreak() | 110 int Statement::hasBreak() |