summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-30 09:08:39 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-30 09:08:39 -0400
commit70b16bc679435c5168d7d8f47a36d72bff24c0d8 (patch)
treee44cfd059032fce9c9cd482bee2ac19180c80a47 /src
parentba1bb90a726ead9a5bb8a8fa6f14d31b06822258 (diff)
parentc515dc8d0d17b9ce5e8c4f31ba2bd58c15fb90bf (diff)
downloadtor-70b16bc679435c5168d7d8f47a36d72bff24c0d8.tar.gz
tor-70b16bc679435c5168d7d8f47a36d72bff24c0d8.zip
Merge branch 'ticket26890'
Diffstat (limited to 'src')
-rw-r--r--src/lib/log/util_bug.c4
-rw-r--r--src/lib/log/util_bug.h3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c
index 42b3670a71..b23f4edc97 100644
--- a/src/lib/log/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -20,10 +20,6 @@
#include <string.h>
-#ifdef __COVERITY__
-int bug_macro_deadcode_dummy__ = 0;
-#endif
-
#ifdef TOR_UNIT_TESTS
static void (*failed_assertion_cb)(void) = NULL;
static int n_bugs_to_capture = 0;
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 61ee60f729..2ef5be8d3f 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -86,13 +86,12 @@
*/
#ifdef __COVERITY__
-extern int bug_macro_deadcode_dummy__;
#undef BUG
// Coverity defines this in global headers; let's override it. This is a
// magic coverity-only preprocessor thing.
// We use this "deadcode_dummy__" trick to prevent coverity from
// complaining about unreachable bug cases.
-#nodef BUG(x) ((x)?(__coverity_panic__(),1):(0+bug_macro_deadcode_dummy__))
+#nodef BUG(x) (x)
#endif /* defined(__COVERITY__) */
#if defined(__COVERITY__) || defined(__clang_analyzer__)