File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 49
49
#include <stdarg.h>
50
50
#include "srtp.h"
51
51
52
+ #if defined(__clang__ ) || (defined(__GNUC__ ) && defined(__has_attribute ))
53
+ #if __has_attribute (format )
54
+ #define LIBSRTP_FORMAT_PRINTF (fmt , args ) \
55
+ __attribute__((format(__printf__, fmt, args)))
56
+ #else
57
+ #define LIBSRTP_FORMAT_PRINTF (fmt , args )
58
+ #endif
59
+ #else
60
+ #define LIBSRTP_FORMAT_PRINTF (fmt , args )
61
+ #endif
62
+
52
63
#ifdef __cplusplus
53
64
extern "C" {
54
65
#endif
@@ -96,7 +107,8 @@ srtp_err_status_t srtp_install_err_report_handler(
96
107
*
97
108
*/
98
109
99
- void srtp_err_report (srtp_err_reporting_level_t level , const char * format , ...);
110
+ void srtp_err_report (srtp_err_reporting_level_t level , const char * format , ...)
111
+ LIBSRTP_FORMAT_PRINTF (2 , 3 );
100
112
101
113
/*
102
114
* debug_module_t defines a debug module
You can’t perform that action at this time.
0 commit comments