r7010@Kushana: nickm | 2006-08-03 10:47:36 -0700

Enable log message format checking in eventdns.c when __GNUC__ is defined.


svn:r6977
This commit is contained in:
Nick Mathewson 2006-08-04 18:26:40 +00:00
parent 3fa1cdafce
commit e8f28a71e8

View File

@ -426,6 +426,13 @@ eventdns_set_log_fn(eventdns_debug_log_fn_type fn)
eventdns_log_fn = fn;
}
#ifdef __GNUC__
#define EVENTDNS_LOG_CHECK __attribute__ ((format(printf, 1, 2)))
#else
#define EVENTDNS_LOG_CHECK
#endif
static void _eventdns_log(const char *fmt, ...) EVENTDNS_LOG_CHECK;
static void
_eventdns_log(const char *fmt, ...)
{