Add format attribute checking for printf() like functions

Patch by Marco Nenciarini <mnencia@debian.org>
This commit is contained in:
Christian Kruse
2014-01-21 14:14:36 +01:00
parent 1db61ce277
commit b4e83cf188
3 changed files with 5 additions and 5 deletions

2
log.h
View File

@@ -25,7 +25,7 @@
#define REPMGR_SYSLOG 1
#define REPMGR_STDERR 2
void stderr_log_with_level(const char *level_name, int level, const char *fmt, ...);
void stderr_log_with_level(const char *level_name, int level, const char *fmt, ...) __attribute__ ((format (PG_PRINTF_ATTRIBUTE, 3, 4)));
/* Standard error logging */
#define stderr_log_debug(...) stderr_log_with_level("DEBUG", LOG_DEBUG, __VA_ARGS__)