add PRINTF_FUNCTION specifier to printf like functions to let gcc tell us when we are using the wrong format specifiers on these functions. Suggested by <MrEIso> via irc.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4224 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-02-13 03:17:19 +00:00
parent cf24c21e86
commit 0a5b02999c
4 changed files with 12 additions and 6 deletions
+6
View File
@@ -161,6 +161,12 @@ typedef unsigned long in_addr_t;
#define DoxyDefine(x)
#endif
#if __GNUC__ >= 3
#define PRINTF_FUNCTION(fmtstr,vars) __attribute__((format(printf,fmtstr,vars)))
#else
#define PRINTF_FUNCTION(fmtstr,vars)
#endif
SWITCH_END_EXTERN_C
#endif