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

[tor-commits] [tor/master] coverity: Silence spurious unreachable warning



commit c862205ba5b9954fe9dbc22a104238a3c04951a8
Author: teor <teor@xxxxxxxxxxxxxx>
Date:   Thu Mar 19 17:11:13 2020 +1000

    coverity: Silence spurious unreachable warning
    
    Closes bug 33641; not in any released version of tor.
---
 src/test/test_circuitbuild.c | 4 ++++
 src/test/test_dir.c          | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/test/test_circuitbuild.c b/src/test/test_circuitbuild.c
index 8b506011b..10d78abc3 100644
--- a/src/test/test_circuitbuild.c
+++ b/src/test/test_circuitbuild.c
@@ -115,8 +115,12 @@ test_new_route_len_unhandled_exit(void *arg)
 
   (void)arg;
 #ifdef ALL_BUGS_ARE_FATAL
+  /* Coverity (and maybe clang analyser) complain that the code following
+   * tt_skip() is unconditionally unreachable. */
+#if !defined(__COVERITY__) && !defined(__clang_analyzer__)
   tt_skip();
 #endif
+#endif
 
   MOCK(count_acceptable_nodes, mock_count_acceptable_nodes);
 
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index e6f87dbd3..bf9a04b07 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -4992,8 +4992,12 @@ test_dir_purpose_needs_anonymity_returns_true_by_default(void *arg)
   (void)arg;
 
 #ifdef ALL_BUGS_ARE_FATAL
+  /* Coverity (and maybe clang analyser) complain that the code following
+   * tt_skip() is unconditionally unreachable. */
+#if !defined(__COVERITY__) && !defined(__clang_analyzer__)
   tt_skip();
 #endif
+#endif
 
   tor_capture_bugs_(1);
   setup_full_capture_of_logs(LOG_WARN);



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