[or-cvs] r17601: {tor} If we are building under Coverity, enable geoip_stats and in (tor/trunk/src/or)

nickm at seul.org nickm at seul.org
Thu Dec 11 21:11:26 UTC 2008


Author: nickm
Date: 2008-12-11 16:11:26 -0500 (Thu, 11 Dec 2008)
New Revision: 17601

Modified:
   tor/trunk/src/or/or.h
Log:
If we are building under Coverity, enable geoip_stats and instrument_downloads.
This makes sure that a) optional code gets analyzed too, and b) it doesn't
look like dead code to Coverity.

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-12-11 21:11:22 UTC (rev 17600)
+++ tor/trunk/src/or/or.h	2008-12-11 21:11:26 UTC (rev 17601)
@@ -15,6 +15,18 @@
 #define OR_H_ID "$Id$"
 
 #include "orconfig.h"
+
+#ifdef __COVERITY__
+/* If we're building for a static analysis, turn on all the off-by-default
+ * features. */
+#ifndef INSTRUMENT_DOWNLOADS
+#define INSTRUMENT_DOWNLOADS 1
+#endif
+#ifndef ENABLE_GEOIP_STATS
+#define ENABLE_GEOIP_STATS 1
+#endif
+#endif
+
 #ifdef MS_WINDOWS
 #define WIN32_WINNT 0x400
 #define _WIN32_WINNT 0x400



More information about the tor-commits mailing list