[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r6977: Enable log message format checking in eventdns.c when __GNUC (in tor/trunk: . src/or)



Author: nickm
Date: 2006-08-04 14:26:40 -0400 (Fri, 04 Aug 2006)
New Revision: 6977

Modified:
   tor/trunk/
   tor/trunk/src/or/eventdns.c
Log:
 r7010@Kushana:  nickm | 2006-08-03 10:47:36 -0700
 Enable log message format checking in eventdns.c when __GNUC__ is defined.



Property changes on: tor/trunk
___________________________________________________________________
Name: svk:merge
   - 1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7009
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
   + 1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7010
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2006-08-04 18:26:13 UTC (rev 6976)
+++ tor/trunk/src/or/eventdns.c	2006-08-04 18:26:40 UTC (rev 6977)
@@ -426,6 +426,13 @@
   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, ...)
 {