Annotate some more printf-style functions, for type checking
This was SVN commit r7176.
This commit is contained in:
parent
d7a057143d
commit
378bd89c1d
@ -201,7 +201,11 @@ private:\
|
|||||||
#if GCC_VERSION
|
#if GCC_VERSION
|
||||||
# define PRINTF_ARGS(fmtpos) __attribute__ ((format (printf, fmtpos, fmtpos+1)))
|
# define PRINTF_ARGS(fmtpos) __attribute__ ((format (printf, fmtpos, fmtpos+1)))
|
||||||
# define VPRINTF_ARGS(fmtpos) __attribute__ ((format (printf, fmtpos, 0)))
|
# define VPRINTF_ARGS(fmtpos) __attribute__ ((format (printf, fmtpos, 0)))
|
||||||
# define WPRINTF_ARGS(fmtpos) /* not currently supported in GCC */
|
# if CONFIG_DEHYDRA
|
||||||
|
# define WPRINTF_ARGS(fmtpos) __attribute__ ((user("format, w, printf, " #fmtpos ", +1")))
|
||||||
|
# else
|
||||||
|
# define WPRINTF_ARGS(fmtpos) /* not currently supported in GCC */
|
||||||
|
# endif
|
||||||
# define VWPRINTF_ARGS(fmtpos) /* not currently supported in GCC */
|
# define VWPRINTF_ARGS(fmtpos) /* not currently supported in GCC */
|
||||||
#else
|
#else
|
||||||
# define PRINTF_ARGS(fmtpos)
|
# define PRINTF_ARGS(fmtpos)
|
||||||
|
@ -61,4 +61,9 @@
|
|||||||
# define CONFIG_FINAL 0
|
# define CONFIG_FINAL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// static type checking with Dehydra
|
||||||
|
#ifndef CONFIG_DEHYDRA
|
||||||
|
# define CONFIG_DEHYDRA 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef INCLUDED_CONFIG
|
#endif // #ifndef INCLUDED_CONFIG
|
||||||
|
@ -255,7 +255,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator()(const wchar_t* fmt, ...)
|
bool operator()(const wchar_t* fmt, ...) WPRINTF_ARGS(2)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
@ -55,13 +55,13 @@ public:
|
|||||||
|
|
||||||
void Render();
|
void Render();
|
||||||
|
|
||||||
void InsertMessage(const wchar_t* szMessage, ...);
|
void InsertMessage(const wchar_t* szMessage, ...) WPRINTF_ARGS(2);
|
||||||
void InsertChar(const int szChar, const wchar_t cooked);
|
void InsertChar(const int szChar, const wchar_t cooked);
|
||||||
|
|
||||||
void SendChatMessage(const wchar_t *szMessage);
|
void SendChatMessage(const wchar_t *szMessage);
|
||||||
void ReceivedChatMessage(const wchar_t *pSender, const wchar_t *szMessage);
|
void ReceivedChatMessage(const wchar_t *pSender, const wchar_t *szMessage);
|
||||||
|
|
||||||
void SetBuffer(const wchar_t* szMessage, ...);
|
void SetBuffer(const wchar_t* szMessage, ...) WPRINTF_ARGS(2);
|
||||||
|
|
||||||
void UseHistoryFile( const VfsPath& filename, int historysize );
|
void UseHistoryFile( const VfsPath& filename, int historysize );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user