]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Tell static analyzer that having ntservice functions not exist is ok
authorNick Mathewson <nickm@torproject.org>
Wed, 15 Jan 2020 15:30:03 +0000 (10:30 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 15 Jan 2020 15:30:03 +0000 (10:30 -0500)
When we made these functions exist unconditionally (as macros on
non-windows platforms), we started to get a dead-code warning on
Coverity.  We now use a macro to tell coverity not to worry about
this particular dead-code instance.

src/app/main/main.c

index 36f85c6a40f54cb762ea6312da0e999d33438d4c..b533406eaad7a657c11f7aad2773d8a13cae04e8 100644 (file)
@@ -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();