summaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-08-04 18:26:40 +0000
committerNick Mathewson <nickm@torproject.org>2006-08-04 18:26:40 +0000
commite8f28a71e863fbec55b1bf7b91c5156ea7a15039 (patch)
treeacf1cd71177ad6cb8dfb1396d2145486ab536ebc /src/or/eventdns.c
parent3fa1cdafce04f523610e7f592b4705089fc4ebed (diff)
downloadtor-e8f28a71e863fbec55b1bf7b91c5156ea7a15039.tar.gz
tor-e8f28a71e863fbec55b1bf7b91c5156ea7a15039.zip
r7010@Kushana: nickm | 2006-08-03 10:47:36 -0700
Enable log message format checking in eventdns.c when __GNUC__ is defined. svn:r6977
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r--src/or/eventdns.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 3144b9b0f3..45f375c95c 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -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, ...)
{