coverity: Silence spurious unreachable warning

Closes bug 33641; not in any released version of tor.
This commit is contained in:
teor 2020-03-19 17:11:13 +10:00
parent fe5ecaa270
commit c862205ba5
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A
2 changed files with 8 additions and 0 deletions

View File

@ -115,7 +115,11 @@ test_new_route_len_unhandled_exit(void *arg)
(void)arg; (void)arg;
#ifdef ALL_BUGS_ARE_FATAL #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(); tt_skip();
#endif
#endif #endif
MOCK(count_acceptable_nodes, mock_count_acceptable_nodes); MOCK(count_acceptable_nodes, mock_count_acceptable_nodes);

View File

@ -4992,7 +4992,11 @@ test_dir_purpose_needs_anonymity_returns_true_by_default(void *arg)
(void)arg; (void)arg;
#ifdef ALL_BUGS_ARE_FATAL #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(); tt_skip();
#endif
#endif #endif
tor_capture_bugs_(1); tor_capture_bugs_(1);