diff options
author | Andris Mednis <Andris.Mednis@zabbix.com> | 2018-06-13 19:40:37 +0300 |
---|---|---|
committer | Andris Mednis <Andris.Mednis@zabbix.com> | 2018-06-13 19:40:37 +0300 |
commit | f184ca305ac89c0e9e18ce33f2ba7f3143793167 (patch) | |
tree | 6b23487218a9a1f2d71339e54409e6c2ef03c302 /include/log.h | |
parent | 986c59835881eec067ccfca0a86c3c9742531ec6 (diff) |
...G...PS. [DEV-698] added __zbx_zabbix_log() format string check
Diffstat (limited to 'include/log.h')
-rw-r--r-- | include/log.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/log.h b/include/log.h index 5857cf604a0..4925d2d3133 100644 --- a/include/log.h +++ b/include/log.h @@ -59,7 +59,14 @@ zbx_err_codes_t; #endif int zabbix_open_log(int type, int level, const char *filename, char **error); -void __zbx_zabbix_log(int level, const char *fmt, ...); + +void __zbx_zabbix_log(int level, const char *fmt, ...) +#if defined(__GNUC__) || defined(__clang__) + __attribute__((__format__(__printf__, 2, 3))); +#else + ; +#endif + void zabbix_close_log(void); #ifndef _WINDOWS int zabbix_increase_log_level(void); |