]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
coverity: Silence spurious unreachable warning
authorteor <teor@torproject.org>
Thu, 19 Mar 2020 07:11:13 +0000 (17:11 +1000)
committerteor <teor@torproject.org>
Thu, 19 Mar 2020 07:11:13 +0000 (17:11 +1000)
Closes bug 33641; not in any released version of tor.

src/test/test_circuitbuild.c
src/test/test_dir.c

index 8b506011b00405a8f6ba4703b2dffe7cb976b445..10d78abc350dff623d91ab157aaa3e4c02535a24 100644 (file)
@@ -115,7 +115,11 @@ 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);
index e6f87dbd32c04afd091b76528faaef2c95aadc0d..bf9a04b079b0e9e445ab3bfb6960a98a73e9c44c 100644 (file)
@@ -4992,7 +4992,11 @@ 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);