diff dmd/dsymbol.h @ 1372:229e02867307

Fix format-string bugs by adding __attribute__((__format__)) in all applicable places and fixing all warnings my gcc produced. Among other things, this should fix several segfaults (including one I just ran into).
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 17 May 2009 00:15:25 +0200
parents 46f6365a50d7
children def7a1d494fd
line wrap: on
line diff
--- a/dmd/dsymbol.h	Sat May 16 23:44:27 2009 +0200
+++ b/dmd/dsymbol.h	Sun May 17 00:15:25 2009 +0200
@@ -122,8 +122,8 @@
     char *locToChars();
     int equals(Object *o);
     int isAnonymous();
-    void error(Loc loc, const char *format, ...);
-    void error(const char *format, ...);
+    void error(Loc loc, const char *format, ...) IS_PRINTF(3);
+    void error(const char *format, ...) IS_PRINTF(2);
     void checkDeprecated(Loc loc, Scope *sc);
     Module *getModule();        // module where declared
     Module *getCompilationModule(); // possibly different for templates