Skip to content
Snippets Groups Projects
Commit 17c63ff9 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge remote-tracking branch 'tor-github/pr/1663'

parents 4025cbad 77246dc0
No related branches found
No related tags found
No related merge requests found
......@@ -1240,7 +1240,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
int done = 0;
result = nt_service_parse_options(argc, argv, &done);
if (done)
if (POSSIBLE(done))
goto done;
pubsub_install();
......
......@@ -227,4 +227,17 @@
#define EAT_SEMICOLON \
struct dummy_semicolon_eater__
/**
* Tell our static analysis tool to believe that (clang's scan-build or
* coverity scan) that an expression might be true. We use this to suppress
* dead-code warnings.
**/
#if defined(__COVERITY__) || defined(__clang_analyzer__)
/* By calling getenv, we force the analyzer not to conclude that 'expr' is
* false. */
#define POSSIBLE(expr) ((expr) || getenv("STATIC_ANALYZER_DEADCODE_DUMMY_"))
#else
#define POSSIBLE(expr) (expr)
#endif
#endif /* !defined(TOR_COMPAT_COMPILER_H) */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment