mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge branch 'ticket26890'
This commit is contained in:
commit
70b16bc679
@ -20,10 +20,6 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef __COVERITY__
|
|
||||||
int bug_macro_deadcode_dummy__ = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TOR_UNIT_TESTS
|
#ifdef TOR_UNIT_TESTS
|
||||||
static void (*failed_assertion_cb)(void) = NULL;
|
static void (*failed_assertion_cb)(void) = NULL;
|
||||||
static int n_bugs_to_capture = 0;
|
static int n_bugs_to_capture = 0;
|
||||||
|
@ -86,13 +86,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __COVERITY__
|
#ifdef __COVERITY__
|
||||||
extern int bug_macro_deadcode_dummy__;
|
|
||||||
#undef BUG
|
#undef BUG
|
||||||
// Coverity defines this in global headers; let's override it. This is a
|
// Coverity defines this in global headers; let's override it. This is a
|
||||||
// magic coverity-only preprocessor thing.
|
// magic coverity-only preprocessor thing.
|
||||||
// We use this "deadcode_dummy__" trick to prevent coverity from
|
// We use this "deadcode_dummy__" trick to prevent coverity from
|
||||||
// complaining about unreachable bug cases.
|
// complaining about unreachable bug cases.
|
||||||
#nodef BUG(x) ((x)?(__coverity_panic__(),1):(0+bug_macro_deadcode_dummy__))
|
#nodef BUG(x) (x)
|
||||||
#endif /* defined(__COVERITY__) */
|
#endif /* defined(__COVERITY__) */
|
||||||
|
|
||||||
#if defined(__COVERITY__) || defined(__clang_analyzer__)
|
#if defined(__COVERITY__) || defined(__clang_analyzer__)
|
||||||
|
Loading…
Reference in New Issue
Block a user