diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-08-04 18:26:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-08-04 18:26:40 +0000 |
commit | e8f28a71e863fbec55b1bf7b91c5156ea7a15039 (patch) | |
tree | acf1cd71177ad6cb8dfb1396d2145486ab536ebc /src/or/eventdns.c | |
parent | 3fa1cdafce04f523610e7f592b4705089fc4ebed (diff) | |
download | tor-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.c | 7 |
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, ...) { |