[tor-commits] [tor/master] Avoid a "constant variable guards dead code" warning from coverity

nickm at torproject.org nickm at torproject.org
Fri Sep 26 13:42:02 UTC 2014


commit 6e7cbfc465f9cbb2bd24ebeb019f542b2f4ccb2e
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Sep 26 09:40:30 2014 -0400

    Avoid a "constant variable guards dead code" warning from coverity
    
    Fixes CID 752028
---
 src/common/compat_libevent.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index 74b54bb..7e6f304 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -210,6 +210,9 @@ tor_libevent_initialize(tor_libevent_cfg *torcfg)
     } else {
       using_iocp_bufferevents = 0;
     }
+#elif defined(__COVERITY__)
+    /* Avoid a 'dead code' warning below. */
+    using_threads = ! torcfg->disable_iocp;
 #endif
 
     if (!using_threads) {



More information about the tor-commits mailing list