diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-20 11:18:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-20 11:19:54 -0400 |
commit | c515dc8d0d17b9ce5e8c4f31ba2bd58c15fb90bf (patch) | |
tree | 05fe95bf0770a97c121cb75a2e406b757cfce874 /src/lib/log/util_bug.h | |
parent | 9ae35975402a823a420cd5efb81a1c3a76f6c4d6 (diff) | |
download | tor-c515dc8d0d17b9ce5e8c4f31ba2bd58c15fb90bf.tar.gz tor-c515dc8d0d17b9ce5e8c4f31ba2bd58c15fb90bf.zip |
Remove over-cleverness from our coverity BUG() definition.
Our previous definition implied that code would never keep running
if a BUG occurred (which it does), and that BUG(x) might be true
even if x was false (which it can't be).
Closes ticket 26890. Bugfix on 0.3.1.4-alpha.
Diffstat (limited to 'src/lib/log/util_bug.h')
-rw-r--r-- | src/lib/log/util_bug.h | 3 |
1 files changed, 1 insertions, 2 deletions
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__) |