mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r19127) -Codechange: Add printf-like warnings to more functions.
This commit is contained in:
parent
d757f81646
commit
151babee57
|
@ -137,7 +137,7 @@ struct DumpTarget {
|
||||||
|
|
||||||
void WriteIndent();
|
void WriteIndent();
|
||||||
|
|
||||||
void WriteLine(const char *format, ...);
|
void CDECL WriteLine(const char *format, ...) WARN_FORMAT(2, 3);
|
||||||
void WriteValue(const char *name, const char *value_str);
|
void WriteValue(const char *name, const char *value_str);
|
||||||
void WriteTile(const char *name, TileIndex t);
|
void WriteTile(const char *name, TileIndex t);
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ struct CStrA : public CBlobT<char>
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add formated string (like sprintf) at the end of existing contents. */
|
/** Add formated string (like sprintf) at the end of existing contents. */
|
||||||
int AddFormat(const char *format, ...)
|
int CDECL AddFormat(const char *format, ...) WARN_FORMAT(2, 3)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
|
@ -110,7 +110,7 @@ struct CStrA : public CBlobT<char>
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Assign formated string (like sprintf). */
|
/** Assign formated string (like sprintf). */
|
||||||
int Format(const char *format, ...)
|
int CDECL Format(const char *format, ...) WARN_FORMAT(2, 3)
|
||||||
{
|
{
|
||||||
base::Free();
|
base::Free();
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
Loading…
Reference in New Issue