We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38f84ce commit 249cdeeCopy full SHA for 249cdee
src/util.h
@@ -73,7 +73,11 @@ static SECP256K1_INLINE void secp256k1_callback_call(const secp256k1_callback *
73
74
/* Like assert(), but when VERIFY is defined, and side-effect safe. */
75
#if defined(COVERAGE)
76
-#define VERIFY_CHECK(check)
+/* Do nothing in coverage mode but try to stay syntactically correct.
77
+ This suppresses a lot of implicit branches introduced by shortcutting
78
+ operators at the cost of not being side-effect safe in coverage mode.
79
+ We rely on the compiler to eliminate the if (0) statement entirely. */
80
+#define VERIFY_CHECK(cond) do { if (0) (void)(cond); } while(0)
81
#define VERIFY_SETUP(stmt)
82
#elif defined(VERIFY)
83
#define VERIFY_CHECK CHECK
0 commit comments