diff gen/logger.cpp @ 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 18ad5601dff7
children 2292878925f4
line wrap: on
line diff
--- a/gen/logger.cpp	Wed Mar 18 00:25:36 2009 +0100
+++ b/gen/logger.cpp	Wed Mar 18 15:03:17 2009 +0100
@@ -71,13 +71,11 @@
     {
         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");
     }
 }