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).
This commit is contained in:
Frits van Bommel
2009-05-17 00:15:25 +02:00
parent 392a4a850e
commit 76ae0b0ab6
15 changed files with 56 additions and 31 deletions

View File

@@ -104,8 +104,8 @@ struct Statement : Object
void print();
char *toChars();
void error(const char *format, ...);
void warning(const char *format, ...);
void error(const char *format, ...) IS_PRINTF(2);
void warning(const char *format, ...) IS_PRINTF(2);
virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual TryCatchStatement *isTryCatchStatement() { return NULL; }
virtual GotoStatement *isGotoStatement() { return NULL; }