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

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



commit 6e7cbfc465f9cbb2bd24ebeb019f542b2f4ccb2e
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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) {

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits